Function at 0x518730
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 - 4], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x10], ecx
mov ebx, edx
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x518b0b
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x5eea58]
cmp dword [eax], 2
jne 0x51877f
mov eax, dword [0x5ee428]
cmp dword [eax], 5
jne 0x518775
mov eax, dword [0x5ee7d8]
cmp dword [eax], 1
jge 0x518783
mov eax, dword [0x5ee428]
cmp dword [eax], 5
jg 0x518783
xor eax, eax
jmp 0x518785
mov al, 1
mov byte [ebp - 0x29], al
mov byte [ebp - 0x2a], 1
mov eax, dword [0x5eea58]
cmp dword [eax], 2
jne 0x5187db
mov eax, dword [0x5ee428]
cmp dword [eax], 4
jne 0x5187a4
mov byte [ebp - 0x2a], 0
mov eax, dword [0x5ee428]
cmp dword [eax], 5
jne 0x5187f3
mov eax, dword [0x5ee7d8]
cmp dword [eax], 0
jne 0x5187f3
mov eax, dword [0x5ee3d8]
cmp dword [eax], 0
je 0x5187d5
mov eax, dword [0x5ee3d8]
mov eax, dword [eax]
mov edx, 0x518b28
call fcn.004058a8
jae 0x5187f3
mov byte [ebp - 0x2a], 0
jmp 0x5187f3
mov eax, dword [0x5ee428]
cmp dword [eax], 4
jne 0x5187ef
mov eax, dword [0x5ee7d8]
cmp dword [eax], 0x5a
je 0x5187f3
mov byte [ebp - 0x2a], 0
xor esi, esi
push ebp
push 0x518ad2
push dword fs:[esi]
mov dword fs:[esi], esp
push 0xe
push ebx
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_FindResourceA
mov ebx, eax
test ebx, ebx
jne 0x518818
call fcn.004124f4
push ebx
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_LoadResource
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x518830
call fcn.004124f4
xor esi, esi
push ebp
push 0x518a20
push dword fs:[esi]
mov dword fs:[esi], esp
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_LockResource
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x518855
call fcn.004124f4
mov eax, dword [ebp - 0x1c]
movzx eax, word [eax + 4]
push eax
lea eax, [ebp - 4]
mov ecx, 1
mov edx, dword [0x5186f0]
call fcn.00406e48
add esp, 4
mov eax, dword [ebp - 0x1c]
movzx eax, word [eax + 4]
push eax
lea eax, [ebp - 8]
mov ecx, 1
mov edx, dword [0x518710]
call fcn.00406e48
add esp, 4
mov eax, dword [ebp - 0x1c]
movzx eax, word [eax + 4]
dec eax
test eax, eax
jl 0x518a09
inc eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x28], 0
xor esi, esi
push ebp
push 0x5189f6
push dword fs:[esi]
mov dword fs:[esi], esp
mov eax, dword [ebp - 0x28]
mov edx, eax
add eax, eax
add eax, eax
add eax, eax
sub eax, edx
mov edx, dword [ebp - 0x1c]
movzx eax, word [edx + eax*2 + 0x12]
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 0x28]
mov dword [edx + ecx*4], eax
lea edx, [ebp - 0x24]
push edx
mov edx, eax
lea ecx, [ebp - 0x20]
mov eax, dword [ebp - 0xc]
call fcn.00518588
mov ebx, eax
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x28]
mov dword [eax + edx*4], 0x7fffffff
test ebx, ebx
jne 0x518906
call fcn.00404e60
jmp 0x5189fd
movzx ecx, word [ebx + 0xc]
movzx eax, word [ebx + 0xe]
imul ecx, eax
cmp ecx, 0x18
jl 0x518926
cmp byte [ebp - 0x2a], 0
jne 0x518926
call fcn.00404e60
jmp 0x5189fd
cmp ecx, 0x20
jl 0x51893b
cmp byte [ebp - 0x29], 0
jne 0x51893b
call fcn.00404e60
jmp 0x5189fd
mov eax, ecx
sub eax, dword [ebp + 8]
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 0x28]
mov dword [edx + ecx*4], eax
mov eax, dword [ebp - 0x28]
mov edx, eax
add eax, eax
add eax, eax
add eax, eax
sub eax, edx
mov edx, dword [ebp - 0x1c]
movzx edx, byte [edx + eax*2 + 6]
cmp edx, dword [ebp - 0x10]
jle 0x518976
sub edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
mov ebx, dword [ebp - 0x28]
add dword [ecx + ebx*4], edx
jmp 0x518988
mov ecx, dword [ebp - 0x10]
sub ecx, edx
mov edx, ecx
add edx, edx
mov ecx, dword [ebp - 4]
mov ebx, dword [ebp - 0x28]
add dword [ecx + ebx*4], edx
mov edx, dword [ebp - 0x1c]
movzx eax, byte [edx + eax*2 + 7]
cmp eax, dword [ebp + 0xc]
jle 0x5189b8
mov eax, dword [ebp - 0x28]
mov edx, eax
add eax, eax
add eax, eax
add eax, eax
sub eax, edx
mov edx, dword [ebp - 0x1c]
movzx eax, byte [edx + eax*2 + 7]
sub eax, dword [ebp - 0x10]
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 0x28]
add dword [edx + ecx*4], eax
jmp 0x5189df
mov eax, dword [ebp - 0x28]
mov edx, eax
add eax, eax
add eax, eax
add eax, eax
sub eax, edx
mov edx, dword [ebp - 0x1c]
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 - 4]
mov ecx, dword [ebp - 0x28]
add dword [edx + ecx*4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5189fd
mov eax, dword [ebp - 0x24]
push eax
call sub.kernel32.dll_FreeResource
ret
inc dword [ebp - 0x28]
dec dword [ebp - 0x30]
jne 0x5188ac
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x518a27
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_FreeResource
ret