Function at 0x402660
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x304
cmp dword [esp + 0x30c], 0
push ebx
push esi
push edi
push ebp
je 0x40297c
cmp dword [esp + 0x31c], 8
jge 0x40297c
mov ecx, dword [esp + 0x31c]
push ecx
call fcn.004025d0
mov eax, dword [esp + 0x31c]
add esp, 4
push 0xa
push eax
push 0
call dword [0x5322d0]
push eax
mov ebp, dword [0x5322cc]
call ebp
mov dword [esp + 0x10], eax
test eax, eax
je 0x402839
push eax
mov ecx, dword [0x53038c]
push ecx
call dword [0x5322d8]
push eax
mov ebp, dword [0x5322dc]
call ebp
mov ebx, eax
mov ecx, dword [esp + 0x31c]
mov eax, dword [esp + 0x31c]
mov esi, ebx
shl eax, 2
lea edx, [eax + eax*4]
lea eax, [ecx + edx*8]
add ebx, 0x1000
lea edx, [ecx + eax*8]
mov ecx, 0x400
lea edi, [edx + edx*4 + 0x522d0d]
lea ebp, [edx + edx*4]
rep movsd dword es:[edi], dword [esi]
lea edi, [ebp + 0x523d0d]
mov esi, ebx
mov ecx, 0x100
add ebx, 0x400
rep movsd dword es:[edi], dword [esi]
mov edi, 0x531a50
mov esi, ebx
mov ecx, 0x19
add ebx, 0x64
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebx]
add ebx, 4
add ebx, 4
xor edx, edx
mov dword [ebp + 0x522801], eax
mov eax, dword [ebx - 4]
mov dword [ebp + 0x5227fc], eax
mov eax, dword [ebp + 0x5227fc]
cmp dword [esp + 0x320], edx
lea eax, [eax + eax*2]
jne 0x402760
lea edi, [esp + 0x14]
jmp 0x402766
lea edi, [ebp + 0x522805]
mov esi, ebx
mov ecx, eax
shr ecx, 2
inc edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0x5227fc]
lea esi, [ecx + ecx*2]
add ebx, esi
cmp edx, 4
jl 0x402748
lea edi, [ebp + 0x522805]
mov esi, ebx
mov ecx, 0x100
add ebx, 0x400
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 0x522c01]
push eax
push 0
call dword [0x5322e0]
mov dword [ebp + 0x522c05], eax
test eax, eax
je 0x40280b
push eax
call dword [0x5322e4]
mov edi, eax
mov dword [ebp + 0x522c09], eax
test edi, edi
je 0x40280b
mov eax, dword [ebp + 0x522c01]
mov esi, ebx
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add ebx, dword [ebp + 0x522c01]
mov esi, dword [0x5322c0]
push ebx
call esi
push eax
call dword [0x532340]
push ebx
call esi
push eax
call dword [0x5322e8]
mov eax, dword [esp + 0x10]
push eax
call dword [0x5322d4]
jmp 0x402858
push 0x2000
mov eax, dword [0x530390]
push 0x40f148
push 0x40f11c
push eax
call dword [0x5323c4]
push 0
call dword [0x532380]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x304
ret
push 0x1000
push 0x40f1a0
push 0x40f188
push 0
call dword [0x5323c4]
push 0
call dword [0x532380]
mov eax, dword [esp + 0x31c]
mov ecx, dword [esp + 0x31c]
shl eax, 2
xor ebx, ebx
xor edx, edx
lea ebp, [eax + eax*4]
lea eax, [ecx + ebp*8]
lea ebp, [ecx + eax*8]
mov eax, 0xffffffff
mov ecx, 0x40
lea edi, [ebp + ebp*4 + 0x522c0d]
lea esi, [ebp + ebp*4]
rep stosd dword es:[edi], eax
xor eax, eax
mov ebp, 0x52f6f3
lea edi, [esp + 0x14]
cmp dword [ebp], 0
jne 0x402907
mov ecx, dword [esp + 0x31c]
mov dword [ebp], ecx
mov cl, byte [edi]
mov byte [ebx + 0x40eb94], cl
mov byte [ebx + 0x5315fa], cl
mov byte [ebp - 3], cl
mov cl, byte [edi + 1]
mov byte [ebx + 0x40eb95], cl
mov byte [ebx + 0x5315f9], cl
mov byte [ebp - 2], cl
mov cl, byte [edi + 2]
mov byte [ebx + 0x40eb96], cl
mov byte [ebx + 0x5315f8], cl
mov byte [ebp - 1], cl
cmp byte [ebp - 3], 0xff
jne 0x4028f4
cmp byte [ebp - 2], 0
jne 0x4028f4
cmp cl, 0xff
jne 0x4028f4
mov byte [esi + 0x522800], al
mov byte [esi + edx + 0x522c0d], al
add edi, 3
inc edx
cmp dword [esi + 0x5227fc], edx
jle 0x402916
add ebp, 7
add ebx, 4
inc eax
cmp ebx, 0x400
jl 0x402898
cmp eax, 0x100
jne 0x402938
push 0x2000
mov eax, dword [0x530390]
push 0x40f180
push 0x40f134
push eax
call dword [0x5323c4]
cmp dword [esi + 0x522801], 0
jne 0x40295e
lea eax, [esi + 0x522c0d]
mov ecx, dword [esi + 0x522c01]
push eax
mov edx, dword [esi + 0x522c09]
push ecx
push edx
call fcn.0040504a
add esp, 0xc
mov ecx, dword [esp + 0x31c]
inc dword [0x40f004]
pop ebp
mov dword [esi + 0x5227e0], ecx
pop edi
pop esi
pop ebx
add esp, 0x304
ret
push 0x2000
mov eax, dword [0x530390]
push 0x40f180
push 0x40f154
push eax
call dword [0x5323c4]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x304
ret