Function at 0x4583d0
Capabilities:
Extract resource via kernel32 functions
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6419e4
mov eax, dword fs:[0]
push eax
sub esp, 0x498
mov eax, dword [0x6d906c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x404], 0
mov dword [ebp - 0x400], 0
cmp dword [ebp + 0xc], 0
jne 0x458866
call fcn.00425fe0
push eax
lea ecx, [ebp - 0xc0]
call fcn.0042f3d0
mov dword [ebp - 4], 0
call fcn.00425ff0
mov ecx, eax
call fcn.004304a0
movzx eax, al
test eax, eax
je 0x458582
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0xc0]
call fcn.0042f940
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
lea ecx, [ebp - 0xc0]
call fcn.0042f800
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x424], eax
cmp dword [ebp - 0x424], 0xffffffff
jne 0x4584a2
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call fcn.0042f5b0
jmp 0x458966
push 0
mov edx, dword [ebp - 0x424]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x400], eax
cmp dword [ebp - 0x400], 0
jne 0x4584d7
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call fcn.0042f5b0
jmp 0x458966
mov dword [ebp - 0x458], 0
mov eax, dword [ebp - 0x400]
push eax
call fcn.00421711
add esp, 4
mov dword [ebp - 0x474], eax
mov ecx, dword [ebp - 0x474]
mov dword [ebp - 0x404], ecx
push 0
lea edx, [ebp - 0x458]
push edx
mov eax, dword [ebp - 0x400]
push eax
mov ecx, dword [ebp - 0x404]
push ecx
mov edx, dword [ebp - 0x424]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x424]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x458]
cmp ecx, dword [ebp - 0x400]
je 0x45857d
mov edx, dword [ebp - 0x404]
mov dword [ebp - 0x490], edx
mov eax, dword [ebp - 0x490]
push eax
call fcn.0042171a
add esp, 4
mov dword [ebp - 0x404], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call fcn.0042f5b0
jmp 0x458966
jmp 0x45884f
call fcn.00425ff0
push eax
lea ecx, [ebp - 0xc0]
call fcn.0042f910
call fcn.00426010
push eax
lea ecx, [ebp - 0x1c8]
call fcn.0042f3d0
mov byte [ebp - 4], 1
mov dword [ebp - 0x418], 0
call fcn.00426420
movzx ecx, al
test ecx, ecx
je 0x4585cb
call fcn.00426000
mov dword [ebp - 0x418], eax
jmp 0x45862c
push 0
lea ecx, [ebp - 0x1c8]
call fcn.0042f800
push eax
call fcn.0042f1f0
add esp, 8
mov dword [ebp - 0x440], eax
mov edx, dword [ebp - 0x440]
push edx
lea ecx, [ebp - 0xc0]
call fcn.0042f800
push eax
call fcn.0043fda0
add esp, 8
mov dword [ebp - 0x418], eax
cmp dword [ebp - 0x440], 0
je 0x45862c
mov eax, dword [ebp - 0x440]
mov dword [ebp - 0x494], eax
mov ecx, dword [ebp - 0x494]
push ecx
call fcn.0042171a
add esp, 4
cmp dword [ebp - 0x418], 0
jne 0x45865b
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1c8]
call fcn.0042f5b0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call fcn.0042f5b0
jmp 0x458966
mov dword [ebp - 0x45c], 0
push 0xffffffffffffffff
mov edx, dword [ebp + 8]
push edx
lea ecx, [ebp - 0x144]
call fcn.0042f410
mov byte [ebp - 4], 2
push 0x64ae50
push 0x6c2500
lea ecx, [ebp - 0x144]
call fcn.00430890
lea eax, [ebp - 0x3f8]
push eax
lea ecx, [ebp - 0x45c]
push ecx
push 1
lea ecx, [ebp - 0x144]
call fcn.0042f800
push eax
mov edx, dword [ebp - 0x418]
push edx
call fcn.0043f090
add esp, 0x14
test eax, eax
je 0x4586f3
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x144]
call fcn.0042f5b0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1c8]
call fcn.0042f5b0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call fcn.0042f5b0
jmp 0x458966
mov eax, dword [ebp - 0x1cc]
mov dword [ebp - 0x400], eax
cmp dword [ebp - 0x400], 0
jne 0x45873d
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x144]
call fcn.0042f5b0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1c8]
call fcn.0042f5b0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call fcn.0042f5b0
jmp 0x458966
mov ecx, dword [ebp - 0x400]
push ecx
call fcn.00421711
add esp, 4
mov dword [ebp - 0x498], eax
mov edx, dword [ebp - 0x498]
mov dword [ebp - 0x404], edx
mov eax, dword [ebp - 0x400]
push eax
mov ecx, dword [ebp - 0x404]
push ecx
mov edx, dword [ebp - 0x45c]
push edx
mov eax, dword [ebp - 0x418]
push eax
call fcn.00440630
add esp, 0x10
mov dword [ebp - 0x460], eax
cmp dword [ebp - 0x460], 0
je 0x458816
cmp dword [ebp - 0x460], 0x600
je 0x458816
mov ecx, dword [ebp - 0x404]
mov dword [ebp - 0x49c], ecx
mov edx, dword [ebp - 0x49c]
push edx
call fcn.0042171a
add esp, 4
mov dword [ebp - 0x404], 0
call fcn.00426420
movzx eax, al
test eax, eax
jne 0x4587e1
mov ecx, dword [ebp - 0x418]
push ecx
call fcn.0043ecb0
add esp, 4
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x144]
call fcn.0042f5b0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1c8]
call fcn.0042f5b0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call fcn.0042f5b0
jmp 0x458966
call fcn.00426420
movzx edx, al
test edx, edx
jne 0x458831
mov eax, dword [ebp - 0x418]
push eax
call fcn.0043ecb0
add esp, 4
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x144]
call fcn.0042f5b0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1c8]
call fcn.0042f5b0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call fcn.0042f5b0
jmp 0x45895e
mov dword [ebp - 0x420], 0
cmp dword [ebp + 0x14], 0
je 0x458881
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x420], ecx
jmp 0x45888c
call fcn.00425fc0
mov dword [ebp - 0x420], eax
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x420]
push ecx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 0x428], eax
cmp dword [ebp - 0x428], 0
jne 0x4588b5
jmp 0x458966
mov edx, dword [ebp - 0x428]
push edx
mov eax, dword [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x444], eax
cmp dword [ebp - 0x444], 0
jne 0x4588e7
mov ecx, dword [ebp - 0x428]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x458966
mov edx, dword [ebp - 0x428]
push edx
mov eax, dword [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x400], eax
cmp dword [ebp - 0x400], 0
jne 0x45890c
jmp 0x458966
mov ecx, dword [ebp - 0x400]
push ecx
call fcn.00421711
add esp, 4
mov dword [ebp - 0x46c], eax
mov edx, dword [ebp - 0x46c]
mov dword [ebp - 0x404], edx
mov eax, dword [ebp - 0x400]
push eax
mov ecx, dword [ebp - 0x444]
push ecx
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
mov edx, dword [ebp - 0x404]
push edx
call fcn.004fad50
add esp, 0xc
mov eax, dword [ebp - 0x444]
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
xor ecx, ecx
jne 0x458410
cmp dword [ebp - 0x404], 0
jne 0x458a5c
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x42c], eax
cmp dword [ebp - 0x42c], 0xffffffff
jne 0x4589a3
jmp 0x458a5c
push 0
mov eax, dword [ebp - 0x42c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x400], eax
cmp dword [ebp - 0x400], 0
jne 0x4589c6
jmp 0x458a5c
mov dword [ebp - 0x464], 0
mov ecx, dword [ebp - 0x400]
push ecx
call fcn.00421711
add esp, 4
mov dword [ebp - 0x470], eax
mov edx, dword [ebp - 0x470]
mov dword [ebp - 0x404], edx
push 0
lea eax, [ebp - 0x464]
push eax
mov ecx, dword [ebp - 0x400]
push ecx
mov edx, dword [ebp - 0x404]
push edx
mov eax, dword [ebp - 0x42c]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x42c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x464]
cmp edx, dword [ebp - 0x400]
je 0x458a55
mov eax, dword [ebp - 0x404]
mov dword [ebp - 0x48c], eax
mov ecx, dword [ebp - 0x48c]
push ecx
call fcn.0042171a
add esp, 4
mov dword [ebp - 0x404], 0
jmp 0x458a5c
cmp dword [ebp - 0x404], 0
jne 0x458a6c
xor eax, eax
jmp 0x458f7f
mov byte [ebp - 0x405], 0
mov dword [ebp - 0x434], 0
push 4
lea edx, [ebp - 0x4a4]
push edx
lea eax, [ebp - 0x43c]
push eax
lea ecx, [ebp - 0x438]
push ecx
mov edx, dword [ebp - 0x400]
push edx
mov eax, dword [ebp - 0x404]
push eax
call fcn.00475280
add esp, 0x18
mov dword [ebp - 0x410], eax
cmp dword [ebp - 0x410], 0
je 0x458d4c
push 0x2c
push 0
lea ecx, [ebp - 0x3c]
push ecx
call fcn.004fab00
add esp, 0xc
mov dword [ebp - 0x3c], 0x28
mov edx, dword [ebp - 0x438]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x43c]
neg eax
mov dword [ebp - 0x34], eax
mov ecx, 1
mov word [ebp - 0x30], cx
mov edx, 0x20
mov word [ebp - 0x2e], dx
mov dword [ebp - 0x2c], 0
mov eax, dword [ebp - 0x438]
imul eax, dword [ebp - 0x43c]
shl eax, 2
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x40c], 0
push 0
push 0
lea ecx, [ebp - 0x40c]
push ecx
push 0
lea edx, [ebp - 0x3c]
push edx
push 0
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [ebp - 0x434], eax
cmp dword [ebp - 0x434], 0
je 0x458d4c
mov dword [ebp - 0x3fc], 0
jmp 0x458b65
mov eax, dword [ebp - 0x3fc]
add eax, 1
mov dword [ebp - 0x3fc], eax
mov ecx, dword [ebp - 0x438]
imul ecx, dword [ebp - 0x43c]
cmp dword [ebp - 0x3fc], ecx
jge 0x458d3d
mov edx, dword [ebp - 0x3fc]
mov eax, dword [ebp - 0x40c]
mov ecx, dword [ebp - 0x3fc]
mov esi, dword [ebp - 0x410]
mov cl, byte [esi + ecx*4 + 3]
mov byte [eax + edx*4 + 3], cl
mov edx, dword [ebp - 0x3fc]
mov eax, dword [ebp - 0x40c]
movzx ecx, byte [eax + edx*4 + 3]
cmp ecx, 0xff
jge 0x458c7c
mov edx, dword [ebp - 0x3fc]
mov eax, dword [ebp - 0x410]
movzx eax, byte [eax + edx*4 + 2]
mov ecx, dword [ebp - 0x3fc]
mov edx, dword [ebp - 0x410]
movzx ecx, byte [edx + ecx*4 + 3]
imul eax, ecx
xor edx, edx
mov ecx, 0xff
div ecx
mov edx, dword [ebp - 0x3fc]
mov ecx, dword [ebp - 0x40c]
mov byte [ecx + edx*4], al
mov edx, dword [ebp - 0x3fc]
mov eax, dword [ebp - 0x410]
movzx eax, byte [eax + edx*4 + 1]
mov ecx, dword [ebp - 0x3fc]
mov edx, dword [ebp - 0x410]
movzx ecx, byte [edx + ecx*4 + 3]
imul eax, ecx
xor edx, edx
mov ecx, 0xff
div ecx
mov edx, dword [ebp - 0x3fc]
mov ecx, dword [ebp - 0x40c]
mov byte [ecx + edx*4 + 1], al
mov edx, dword [ebp - 0x3fc]
mov eax, dword [ebp - 0x410]
movzx eax, byte [eax + edx*4]
mov ecx, dword [ebp - 0x3fc]
mov edx, dword [ebp - 0x410]
movzx ecx, byte [edx + ecx*4 + 3]
imul eax, ecx
xor edx, edx
mov ecx, 0xff
div ecx
mov edx, dword [ebp - 0x3fc]
mov ecx, dword [ebp - 0x40c]
mov byte [ecx + edx*4 + 2], al
mov byte [ebp - 0x405], 1
jmp 0x458cda
mov edx, dword [ebp - 0x3fc]
mov eax, dword [ebp - 0x40c]
mov ecx, dword [ebp - 0x3fc]
mov esi, dword [ebp - 0x410]
mov cl, byte [esi + ecx*4 + 2]
mov byte [eax + edx*4], cl
mov edx, dword [ebp - 0x3fc]
mov eax, dword [ebp - 0x40c]
mov ecx, dword [ebp - 0x3fc]
mov esi, dword [ebp - 0x410]
mov cl, byte [esi + ecx*4 + 1]
mov byte [eax + edx*4 + 1], cl
mov edx, dword [ebp - 0x3fc]
mov eax, dword [ebp - 0x40c]
mov ecx, dword [ebp - 0x3fc]
mov esi, dword [ebp - 0x410]
mov cl, byte [esi + ecx*4]
mov byte [eax + edx*4 + 2], cl
mov edx, dword [ebp - 0x3fc]
mov eax, dword [ebp - 0x40c]
mov ecx, dword [eax + edx*4]
cmp ecx, dword [ebp + 0x10]
jne 0x458d38
mov edx, dword [ebp - 0x3fc]
mov eax, dword [ebp - 0x40c]
mov byte [eax + edx*4], 0
mov ecx, dword [ebp - 0x3fc]
mov edx, dword [ebp - 0x40c]
mov byte [edx + ecx*4 + 1], 0
mov eax, dword [ebp - 0x3fc]
mov ecx, dword [ebp - 0x40c]
mov byte [ecx + eax*4 + 2], 0
mov edx, dword [ebp - 0x3fc]
mov eax, dword [ebp - 0x40c]
mov byte [eax + edx*4 + 3], 0
mov byte [ebp - 0x405], 1
jmp 0x458b56
mov ecx, dword [ebp - 0x410]
push ecx
call fcn.00475260
add esp, 4
mov edx, dword [ebp - 0x400]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x448], eax
mov eax, dword [ebp - 0x448]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x478], eax
mov ecx, dword [ebp - 0x400]
push ecx
mov edx, dword [ebp - 0x404]
push edx
mov eax, dword [ebp - 0x478]
push eax
call fcn.004fad50
add esp, 0xc
mov dword [ebp - 0x430], 0
lea ecx, [ebp - 0x430]
push ecx
push 1
mov edx, dword [ebp - 0x448]
push edx
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
mov eax, dword [ebp - 0x430]
mov dword [ebp - 0x47c], eax
push 0x10
call sub.gdiplus.dll_GdipAlloc
mov dword [ebp - 0x468], eax
mov dword [ebp - 4], 3
cmp dword [ebp - 0x468], 0
je 0x458df6
push 0
mov ecx, dword [ebp - 0x47c]
push ecx
mov ecx, dword [ebp - 0x468]
call fcn.00450280
mov dword [ebp - 0x44c], eax
jmp 0x458e00
mov dword [ebp - 0x44c], 0
mov edx, dword [ebp - 0x44c]
mov dword [ebp - 0x480], edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x480]
mov dword [ebp - 0x41c], eax
cmp dword [ebp - 0x41c], 0
je 0x458e4d
mov ecx, dword [ebp - 0x41c]
mov edx, dword [ecx + 8]
mov dword [ebp - 0x484], edx
mov eax, dword [ebp - 0x41c]
mov dword [eax + 8], 0
cmp dword [ebp - 0x484], 0
je 0x458e78
mov dword [ebp - 0x41c], 0
mov ecx, dword [ebp - 0x430]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x430]
push eax
mov ecx, dword [edx + 8]
call ecx
mov edx, dword [ebp - 0x448]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp - 0x404]
mov dword [ebp - 0x488], eax
mov ecx, dword [ebp - 0x488]
push ecx
call fcn.0042171a
add esp, 4
mov dword [ebp - 0x404], 0
cmp dword [ebp - 0x434], 0
jne 0x458eb6
cmp dword [ebp - 0x41c], 0
jne 0x458eb6
xor eax, eax
jmp 0x458f7f
push 0xa4
call fcn.00421335
add esp, 4
mov dword [ebp - 0x450], eax
mov dword [ebp - 4], 4
cmp dword [ebp - 0x450], 0
je 0x458eec
mov ecx, dword [ebp - 0x450]
call fcn.004230a0
mov dword [ebp - 0x454], eax
jmp 0x458ef6
mov dword [ebp - 0x454], 0
mov edx, dword [ebp - 0x454]
mov dword [ebp - 0x4a0], edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x4a0]
mov dword [ebp - 0x414], eax
mov ecx, dword [ebp - 0x414]
mov dword [ecx + 8], 0
mov edx, dword [ebp - 0x414]
mov dword [edx + 0xc], 0
mov eax, dword [ebp - 0x414]
mov ecx, dword [ebp - 0x41c]
mov dword [eax], ecx
mov edx, dword [ebp - 0x414]
mov eax, dword [ebp - 0x434]
mov dword [edx + 4], eax
mov ecx, dword [ebp - 0x414]
mov edx, dword [ebp - 0x438]
mov dword [ecx + 0x10], edx
mov eax, dword [ebp - 0x414]
mov ecx, dword [ebp - 0x43c]
mov dword [eax + 0x14], ecx
mov edx, dword [ebp - 0x414]
mov al, byte [ebp - 0x405]
mov byte [edx + 0x18], al
mov eax, dword [ebp - 0x414]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00421065
mov esp, ebp
pop ebp
ret