Function at 0x51d560
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56591a
mov eax, dword fs:[0]
push eax
sub esp, 0x478
mov eax, dword [0x5a0440]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x3bc], 0
mov dword [ebp - 0x3c4], 0
mov dword [ebp - 0x3c0], 0
mov dword [ebp - 0x3d0], 0
mov dword [ebp - 0x3cc], 0
mov dword [ebp - 0x3c8], 0
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x3cc]
push eax
mov ecx, dword [ebp - 0x3d0]
push ecx
lea ecx, [ebp - 0x3d0]
call fcn.0051f310
mov edx, dword [ebp - 0x3d0]
mov dword [ebp - 0x3cc], edx
mov eax, dword [ebp + 0xc]
shr eax, 0x10
and eax, 0xffff
movzx ecx, ax
test ecx, ecx
je 0x51df1c
call fcn.004d8e40
push eax
lea ecx, [ebp - 0x19c]
call fcn.004e0830
mov byte [ebp - 4], 1
call fcn.004d8e50
mov ecx, eax
call fcn.004e1be0
movzx edx, al
test edx, edx
je 0x51dd2d
mov byte [ebp - 0x110], 0
push 0xff
push 0
lea eax, [ebp - 0x10f]
push eax
call fcn.004bb790
add esp, 0xc
mov byte [ebp - 0x3e0], 0
xor ecx, ecx
mov word [ebp - 0x3df], cx
push 0x100
lea edx, [ebp - 0x110]
push edx
push 0
push 0
push 0
push 0
push 3
lea eax, [ebp - 0x3e0]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00559556
add esp, 0x24
mov dword [ebp - 0x474], eax
mov dword [ebp - 0x118], 0
mov dword [ebp - 0x114], 0
push 0
push 0
lea ecx, [ebp - 0x128]
call fcn.004036a0
mov byte [ebp - 4], 2
mov edx, 1
imul eax, edx, 0
movsx ecx, byte [ebp + eax - 0x3e0]
test ecx, ecx
je 0x51d70f
mov edx, dword [ebp + 0xc]
movsx eax, byte [edx]
test eax, eax
jne 0x51d6e2
mov dword [ebp - 0x400], 0
jmp 0x51d6f4
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.004bdf60
add esp, 4
mov dword [ebp - 0x400], eax
mov edx, dword [ebp - 0x400]
push edx
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x128]
call fcn.00403060
jmp 0x51daf1
push 0x57e068
lea ecx, [ebp - 0x110]
push ecx
call fcn.004b9b31
add esp, 8
test eax, eax
jne 0x51d9b6
mov edx, dword [ebp + 0xc]
push edx
lea ecx, [ebp - 0x140]
call fcn.00403160
mov byte [ebp - 4], 3
mov eax, dword [0x587d24]
mov dword [ebp - 0x438], eax
movsx ecx, byte [0x57e070]
test ecx, ecx
jne 0x51d760
mov dword [ebp - 0x3f8], 0
jmp 0x51d773
push 0x57e070
call fcn.004bdf60
add esp, 4
mov dword [ebp - 0x3f8], eax
mov edx, dword [ebp - 0x3f8]
push edx
mov eax, dword [ebp - 0x438]
push eax
push 0x57e070
lea ecx, [ebp - 0x140]
call fcn.0040ee20
mov dword [ebp - 0x408], eax
mov ecx, dword [ebp - 0x408]
push ecx
push 0
lea edx, [ebp - 0x158]
push edx
lea ecx, [ebp - 0x140]
call fcn.00403860
mov byte [ebp - 4], 4
lea eax, [ebp - 0x1e4]
push eax
call fcn.004dfb50
add esp, 4
mov dword [ebp - 0x40c], eax
mov ecx, dword [ebp - 0x40c]
mov dword [ebp - 0x41c], ecx
mov byte [ebp - 4], 5
lea edx, [ebp - 0x1cc]
push edx
call fcn.004dfbc0
add esp, 4
mov dword [ebp - 0x414], eax
mov eax, dword [ebp - 0x414]
mov dword [ebp - 0x424], eax
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x41c]
push ecx
mov edx, dword [ebp - 0x424]
push edx
lea eax, [ebp - 0x1fc]
push eax
call fcn.004349d0
add esp, 0xc
mov dword [ebp - 0x42c], eax
mov ecx, dword [ebp - 0x42c]
mov dword [ebp - 0x434], ecx
mov byte [ebp - 4], 7
push 0x57e074
mov edx, dword [ebp - 0x434]
push edx
lea eax, [ebp - 0x22c]
push eax
call fcn.00405960
add esp, 0xc
mov dword [ebp - 0x43c], eax
mov ecx, dword [ebp - 0x43c]
mov dword [ebp - 0x444], ecx
mov byte [ebp - 4], 8
lea edx, [ebp - 0x158]
push edx
mov eax, dword [ebp - 0x444]
push eax
lea ecx, [ebp - 0x1b4]
push ecx
call fcn.00405af0
add esp, 0xc
mov dword [ebp - 0x44c], eax
mov edx, dword [ebp - 0x44c]
push edx
lea ecx, [ebp - 0x128]
call fcn.00404670
push 0
push 1
lea ecx, [ebp - 0x1b4]
call fcn.004036a0
mov byte [ebp - 4], 7
push 0
push 1
lea ecx, [ebp - 0x22c]
call fcn.004036a0
mov byte [ebp - 4], 6
push 0
push 1
lea ecx, [ebp - 0x1fc]
call fcn.004036a0
mov byte [ebp - 4], 5
push 0
push 1
lea ecx, [ebp - 0x1cc]
call fcn.004036a0
mov byte [ebp - 4], 4
push 0
push 1
lea ecx, [ebp - 0x1e4]
call fcn.004036a0
lea eax, [ebp - 0x128]
push eax
call fcn.0051cec0
add esp, 4
test eax, eax
jne 0x51d98b
lea ecx, [ebp - 0x3d0]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00512000
mov edx, dword [ebp - 0x3bc]
or edx, 1
mov dword [ebp - 0x3bc], edx
mov byte [ebp - 4], 3
push 0
push 1
lea ecx, [ebp - 0x158]
call fcn.004036a0
mov byte [ebp - 4], 2
push 0
push 1
lea ecx, [ebp - 0x140]
call fcn.004036a0
mov byte [ebp - 4], 1
push 0
push 1
lea ecx, [ebp - 0x128]
call fcn.004036a0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x19c]
call fcn.004e0a30
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3d0]
call fcn.00509310
mov eax, dword [ebp + 8]
jmp 0x51e159
mov byte [ebp - 4], 3
push 0
push 1
lea ecx, [ebp - 0x158]
call fcn.004036a0
mov byte [ebp - 4], 2
push 0
push 1
lea ecx, [ebp - 0x140]
call fcn.004036a0
jmp 0x51daf1
lea eax, [ebp - 0x214]
push eax
call fcn.004dfb50
add esp, 4
mov dword [ebp - 0x454], eax
mov ecx, dword [ebp - 0x454]
mov dword [ebp - 0x464], ecx
mov byte [ebp - 4], 9
lea edx, [ebp - 0x274]
push edx
call fcn.004dfbc0
add esp, 4
mov dword [ebp - 0x45c], eax
mov eax, dword [ebp - 0x45c]
mov dword [ebp - 0x46c], eax
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0x464]
push ecx
mov edx, dword [ebp - 0x46c]
push edx
lea eax, [ebp - 0x244]
push eax
call fcn.004349d0
add esp, 0xc
mov dword [ebp - 0x404], eax
mov ecx, dword [ebp - 0x404]
mov dword [ebp - 0x458], ecx
mov byte [ebp - 4], 0xb
push 0x57e078
mov edx, dword [ebp - 0x458]
push edx
lea eax, [ebp - 0x28c]
push eax
call fcn.00405960
add esp, 0xc
mov dword [ebp - 0x440], eax
mov ecx, dword [ebp - 0x440]
mov dword [ebp - 0x410], ecx
mov byte [ebp - 4], 0xc
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x410]
push eax
lea ecx, [ebp - 0x25c]
push ecx
call fcn.00405960
add esp, 0xc
mov dword [ebp - 0x468], eax
mov edx, dword [ebp - 0x468]
push edx
lea ecx, [ebp - 0x128]
call fcn.00404670
push 0
push 1
lea ecx, [ebp - 0x25c]
call fcn.004036a0
mov byte [ebp - 4], 0xb
push 0
push 1
lea ecx, [ebp - 0x28c]
call fcn.004036a0
mov byte [ebp - 4], 0xa
push 0
push 1
lea ecx, [ebp - 0x244]
call fcn.004036a0
mov byte [ebp - 4], 9
push 0
push 1
lea ecx, [ebp - 0x274]
call fcn.004036a0
mov byte [ebp - 4], 2
push 0
push 1
lea ecx, [ebp - 0x214]
call fcn.004036a0
cmp dword [ebp - 0x114], 0x10
jb 0x51db14
mov eax, dword [ebp - 0x478]
mov dword [ebp - 0x3e8], eax
mov ecx, dword [ebp - 0x128]
mov dword [ebp - 0x3e8], ecx
jmp 0x51db20
lea edx, [ebp - 0x128]
mov dword [ebp - 0x3e8], edx
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp - 0x3e8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x3dc], eax
cmp dword [ebp - 0x3dc], 0xffffffff
jne 0x51dba8
lea ecx, [ebp - 0x3d0]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00512000
mov edx, dword [ebp - 0x3bc]
or edx, 1
mov dword [ebp - 0x3bc], edx
mov byte [ebp - 4], 1
push 0
push 1
lea ecx, [ebp - 0x128]
call fcn.004036a0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x19c]
call fcn.004e0a30
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3d0]
call fcn.00509310
mov eax, dword [ebp + 8]
jmp 0x51e159
push 0
mov eax, dword [ebp - 0x3dc]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x3c0], eax
cmp dword [ebp - 0x3c0], 0
je 0x51dbcf
cmp dword [ebp - 0x3c0], 0xffffffff
jne 0x51dc36
mov ecx, dword [ebp - 0x3dc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [ebp - 0x3d0]
push edx
mov ecx, dword [ebp + 8]
call fcn.00512000
mov eax, dword [ebp - 0x3bc]
or eax, 1
mov dword [ebp - 0x3bc], eax
mov byte [ebp - 4], 1
push 0
push 1
lea ecx, [ebp - 0x128]
call fcn.004036a0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x19c]
call fcn.004e0a30
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3d0]
call fcn.00509310
mov eax, dword [ebp + 8]
jmp 0x51e159
mov dword [ebp - 0x3ec], 0
mov ecx, dword [ebp - 0x3c0]
push ecx
call fcn.004b7abd
add esp, 4
mov dword [ebp - 0x418], eax
mov edx, dword [ebp - 0x418]
mov dword [ebp - 0x3c4], edx
push 0
lea eax, [ebp - 0x3ec]
push eax
mov ecx, dword [ebp - 0x3c0]
push ecx
mov edx, dword [ebp - 0x3c4]
push edx
mov eax, dword [ebp - 0x3dc]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x3dc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x3ec]
cmp edx, dword [ebp - 0x3c0]
je 0x51dd15
mov eax, dword [ebp - 0x3c4]
mov dword [ebp - 0x448], eax
mov ecx, dword [ebp - 0x448]
push ecx
call fcn.004b948e
add esp, 4
lea edx, [ebp - 0x3d0]
push edx
mov ecx, dword [ebp + 8]
call fcn.00512000
mov eax, dword [ebp - 0x3bc]
or eax, 1
mov dword [ebp - 0x3bc], eax
mov byte [ebp - 4], 1
push 0
push 1
lea ecx, [ebp - 0x128]
call fcn.004036a0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x19c]
call fcn.004e0a30
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3d0]
call fcn.00509310
mov eax, dword [ebp + 8]
jmp 0x51e159
mov byte [ebp - 4], 1
push 0
push 1
lea ecx, [ebp - 0x128]
call fcn.004036a0
jmp 0x51df08
call fcn.004d8e50
push eax
lea ecx, [ebp - 0x19c]
call fcn.004e0e60
push 2
push 0
lea ecx, [ebp - 0x19c]
call fcn.004e0dc0
push eax
call fcn.005266b0
add esp, 0xc
mov dword [ebp - 0x3e4], eax
lea ecx, [ebp - 0x3b8]
push ecx
lea edx, [ebp - 0x460]
push edx
push 1
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x3e4]
push ecx
call fcn.00525ce0
add esp, 0x14
test eax, eax
je 0x51ddca
lea edx, [ebp - 0x3d0]
push edx
mov ecx, dword [ebp + 8]
call fcn.00512000
mov eax, dword [ebp - 0x3bc]
or eax, 1
mov dword [ebp - 0x3bc], eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x19c]
call fcn.004e0a30
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3d0]
call fcn.00509310
mov eax, dword [ebp + 8]
jmp 0x51e159
mov ecx, dword [ebp - 0x290]
mov dword [ebp - 0x3c0], ecx
cmp dword [ebp - 0x3c0], 0
jne 0x51de26
lea edx, [ebp - 0x3d0]
push edx
mov ecx, dword [ebp + 8]
call fcn.00512000
mov eax, dword [ebp - 0x3bc]
or eax, 1
mov dword [ebp - 0x3bc], eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x19c]
call fcn.004e0a30
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3d0]
call fcn.00509310
mov eax, dword [ebp + 8]
jmp 0x51e159
mov ecx, dword [ebp - 0x3c0]
push ecx
call fcn.004b7abd
add esp, 4
mov dword [ebp - 0x420], eax
mov edx, dword [ebp - 0x420]
mov dword [ebp - 0x3c4], edx
push 3
mov eax, dword [ebp - 0x3c0]
push eax
mov ecx, dword [ebp - 0x3c4]
push ecx
mov edx, dword [ebp - 0x460]
push edx
mov eax, dword [ebp - 0x3e4]
push eax
call fcn.00526cf0
add esp, 0x14
mov dword [ebp - 0x3fc], eax
cmp dword [ebp - 0x3fc], 0
je 0x51def9
cmp dword [ebp - 0x3fc], 0x600
je 0x51def9
mov ecx, dword [ebp - 0x3c4]
mov dword [ebp - 0x428], ecx
mov edx, dword [ebp - 0x428]
push edx
call fcn.004b948e
add esp, 4
mov eax, dword [ebp - 0x3e4]
push eax
call fcn.00525a20
add esp, 4
lea ecx, [ebp - 0x3d0]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00512000
mov edx, dword [ebp - 0x3bc]
or edx, 1
mov dword [ebp - 0x3bc], edx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x19c]
call fcn.004e0a30
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3d0]
call fcn.00509310
mov eax, dword [ebp + 8]
jmp 0x51e159
mov eax, dword [ebp - 0x3e4]
push eax
call fcn.00525a20
add esp, 4
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x19c]
call fcn.004e0a30
jmp 0x51e08a
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.004d8e20
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0x3d8], eax
cmp dword [ebp - 0x3d8], 0
jne 0x51df77
lea eax, [ebp - 0x3d0]
push eax
mov ecx, dword [ebp + 8]
call fcn.00512000
mov ecx, dword [ebp - 0x3bc]
or ecx, 1
mov dword [ebp - 0x3bc], ecx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3d0]
call fcn.00509310
mov eax, dword [ebp + 8]
jmp 0x51e159
mov edx, dword [ebp - 0x3d8]
push edx
call fcn.004d8e20
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x3f4], eax
cmp dword [ebp - 0x3f4], 0
jne 0x51dfde
mov eax, dword [ebp - 0x3d8]
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
lea ecx, [ebp - 0x3d0]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00512000
mov edx, dword [ebp - 0x3bc]
or edx, 1
mov dword [ebp - 0x3bc], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3d0]
call fcn.00509310
mov eax, dword [ebp + 8]
jmp 0x51e159
mov eax, dword [ebp - 0x3d8]
push eax
call fcn.004d8e20
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x3c0], eax
cmp dword [ebp - 0x3c0], 0
jne 0x51e038
lea ecx, [ebp - 0x3d0]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00512000
mov edx, dword [ebp - 0x3bc]
or edx, 1
mov dword [ebp - 0x3bc], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3d0]
call fcn.00509310
mov eax, dword [ebp + 8]
jmp 0x51e159
mov eax, dword [ebp - 0x3c0]
push eax
call fcn.004b7abd
add esp, 4
mov dword [ebp - 0x450], eax
mov ecx, dword [ebp - 0x450]
mov dword [ebp - 0x3c4], ecx
mov edx, dword [ebp - 0x3c0]
push edx
mov eax, dword [ebp - 0x3f4]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
mov ecx, dword [ebp - 0x3c4]
push ecx
call fcn.004bb140
add esp, 0xc
mov edx, dword [ebp - 0x3d8]
push edx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp - 0x3c0]
push ecx
mov edx, dword [ebp - 0x3c4]
push edx
lea eax, [ebp - 0x484]
push eax
call fcn.0051e180
add esp, 0x10
mov dword [ebp - 0x430], eax
mov ecx, dword [ebp - 0x430]
mov dword [ebp - 0x3f0], ecx
mov byte [ebp - 4], 0xd
lea edx, [ebp - 0x3d0]
cmp edx, dword [ebp - 0x3f0]
je 0x51e0fc
lea ecx, [ebp - 0x3d0]
call fcn.00509310
xor ecx, ecx
mov byte [ebp - 0x3d1], cl
movzx edx, byte [ebp - 0x3d1]
push edx
mov eax, dword [ebp - 0x3f0]
push eax
lea ecx, [ebp - 0x3d0]
call fcn.00508e80
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x484]
call fcn.00509310
mov ecx, dword [ebp - 0x3c4]
mov dword [ebp - 0x470], ecx
mov edx, dword [ebp - 0x470]
push edx
call fcn.004b948e
add esp, 4
lea eax, [ebp - 0x3d0]
push eax
mov ecx, dword [ebp + 8]
call fcn.00512000
mov ecx, dword [ebp - 0x3bc]
or ecx, 1
mov dword [ebp - 0x3bc], ecx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3d0]
call fcn.00509310
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004b8605
mov esp, ebp
pop ebp
ret