Function at 0x49f844
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 8], ecx
mov ebx, edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x49fc13
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x4f3718]
cmp dword [eax], 2
jne 0x49f893
mov eax, dword [0x4f30b4]
cmp dword [eax], 5
jne 0x49f889
mov eax, dword [0x4f34d8]
cmp dword [eax], 1
jge 0x49f897
mov eax, dword [0x4f30b4]
cmp dword [eax], 5
jg 0x49f897
xor eax, eax
jmp 0x49f899
mov al, 1
mov byte [ebp - 0x29], al
mov byte [ebp - 0x2a], 1
mov eax, dword [0x4f3718]
cmp dword [eax], 2
jne 0x49f8ef
mov eax, dword [0x4f30b4]
cmp dword [eax], 4
jne 0x49f8b8
mov byte [ebp - 0x2a], 0
mov eax, dword [0x4f30b4]
cmp dword [eax], 5
jne 0x49f907
mov eax, dword [0x4f34d8]
cmp dword [eax], 0
jne 0x49f907
mov eax, dword [0x4f305c]
cmp dword [eax], 0
je 0x49f8e9
mov eax, dword [0x4f305c]
mov eax, dword [eax]
mov edx, 0x49fc30
call fcn.00404c88
jae 0x49f907
mov byte [ebp - 0x2a], 0
jmp 0x49f907
mov eax, dword [0x4f30b4]
cmp dword [eax], 4
jne 0x49f903
mov eax, dword [0x4f34d8]
cmp dword [eax], 0x5a
je 0x49f907
mov byte [ebp - 0x2a], 0
xor esi, esi
push ebp
push 0x49fbda
push dword fs:[esi]
mov dword fs:[esi], esp
push 0xe
push ebx
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_FindResourceA
mov ebx, eax
test ebx, ebx
jne 0x49f92c
call fcn.0040f2ec
push ebx
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_LoadResource
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x49f944
call fcn.0040f2ec
xor esi, esi
push ebp
push 0x49fb28
push dword fs:[esi]
mov dword fs:[esi], esp
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_LockResource
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x49f969
call fcn.0040f2ec
mov eax, dword [ebp - 0x14]
movzx eax, word [eax + 4]
push eax
lea eax, [ebp - 0x24]
mov ecx, 1
mov edx, dword [0x49f804]
call fcn.00405ff8
add esp, 4
mov eax, dword [ebp - 0x14]
movzx eax, word [eax + 4]
push eax
lea eax, [ebp - 0x28]
mov ecx, 1
mov edx, dword [0x49f824]
call fcn.00405ff8
add esp, 4
mov eax, dword [ebp - 0x14]
movzx eax, word [eax + 4]
dec eax
test eax, eax
jl 0x49fb11
inc eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x20], 0
xor esi, esi
push ebp
push 0x49fafe
push dword fs:[esi]
mov dword fs:[esi], esp
mov eax, dword [ebp - 0x20]
mov edx, eax
shl eax, 3
sub eax, edx
mov edx, dword [ebp - 0x14]
movzx eax, word [edx + eax*2 + 0x12]
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x20]
mov dword [edx + ecx*4], eax
lea edx, [ebp - 0x1c]
push edx
mov edx, eax
lea ecx, [ebp - 0x18]
mov eax, dword [ebp - 4]
call fcn.0049f69c
mov ebx, eax
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 0x20]
mov dword [eax + edx*4], 0x7fffffff
test ebx, ebx
jne 0x49fa17
call fcn.004042c0
jmp 0x49fb05
movzx ecx, word [ebx + 0xc]
movzx eax, word [ebx + 0xe]
imul ecx, eax
cmp ecx, 0x18
jl 0x49fa37
cmp byte [ebp - 0x2a], 0
jne 0x49fa37
call fcn.004042c0
jmp 0x49fb05
cmp ecx, 0x20
jl 0x49fa4c
cmp byte [ebp - 0x29], 0
jne 0x49fa4c
call fcn.004042c0
jmp 0x49fb05
mov eax, ecx
sub eax, dword [ebp + 8]
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
mov dword [edx + ecx*4], eax
mov eax, dword [ebp - 0x20]
mov edx, eax
shl eax, 3
sub eax, edx
mov edx, dword [ebp - 0x14]
movzx edx, byte [edx + eax*2 + 6]
cmp edx, dword [ebp - 8]
jle 0x49fa84
sub edx, dword [ebp - 8]
mov ecx, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x20]
add dword [ecx + ebx*4], edx
jmp 0x49fa96
mov ecx, dword [ebp - 8]
sub ecx, edx
mov edx, ecx
add edx, edx
mov ecx, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x20]
add dword [ecx + ebx*4], edx
mov edx, dword [ebp - 0x14]
movzx eax, byte [edx + eax*2 + 7]
cmp eax, dword [ebp + 0xc]
jle 0x49fac3
mov eax, dword [ebp - 0x20]
mov edx, eax
shl eax, 3
sub eax, edx
mov edx, dword [ebp - 0x14]
movzx eax, byte [edx + eax*2 + 7]
sub eax, dword [ebp - 8]
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
add dword [edx + ecx*4], eax
jmp 0x49fae7
mov eax, dword [ebp - 0x20]
mov edx, eax
shl eax, 3
sub eax, edx
mov edx, dword [ebp - 0x14]
movzx eax, byte [edx + eax*2 + 7]
mov edx, dword [ebp + 0xc]
sub edx, eax
mov eax, edx
add eax, eax
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
add dword [edx + ecx*4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x49fb05
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_FreeResource
ret
inc dword [ebp - 0x20]
dec dword [ebp - 0x30]
jne 0x49f9c0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x49fb2f
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_FreeResource
ret