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

Disassembly:
push 0xffffffffffffffff
push 0x5e18e1
mov eax, dword fs:[0]
push eax
sub esp, 0x250
mov eax, dword [0x658aa8]
xor eax, esp
mov dword [esp + 0x24c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x658aa8]
xor eax, esp
push eax
lea eax, [esp + 0x264]
mov dword fs:[0], eax
mov eax, dword [esp + 0x27c]
xor ebx, ebx
cmp ecx, ebx
jne 0x458d95
mov ecx, dword [0x664b30]
or edi, 0xffffffff
push edi
lea eax, [esp + 0x60]
push ecx
lea esi, [esp + 0x60]
mov dword [esp + 0x60], eax
mov byte [esp + 0x64], bl
call fcn.00428e20
mov dword [esp + 0x26c], ebx
mov eax, dword [0x664b78]
cmp byte [eax], bl
jne 0x458af5
mov eax, dword [esp + 0x274]
cmp eax, ebx
je 0x458a34
push eax
mov edx, esi
push edx
call fcn.00428d20
mov eax, dword [esp + 0x58]
push ebx
push 0x80
push 3
push ebx
push 1
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, edi
jne 0x458a7a
mov dword [esp + 0x26c], edi
mov eax, dword [esp + 0x58]
lea ecx, [esp + 0x5c]
cmp eax, ecx
je 0x458df3
push eax
call fcn.0049b045
add esp, 4
jmp 0x458df3
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
jne 0x458aad
mov dword [esp + 0x26c], edi
mov eax, dword [esp + 0x58]
lea edx, [esp + 0x5c]
cmp eax, edx
je 0x458df3
push eax
call fcn.0049b045
add esp, 4
jmp 0x458df3
push esi
mov dword [esp + 0x1c], ebx
call fcn.0048fcef
add esp, 4
push ebx
mov edi, eax
lea eax, [esp + 0x1c]
push eax
push esi
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x18], esi
je 0x458d73
push edi
call fcn.0048fcfa
add esp, 4
mov dword [esp + 0x26c], 0xffffffff
jmp 0x458a5c
push eax
lea edx, [esp + 0x5c]
push edx
call fcn.00428d20
mov ecx, dword [0x664bc0]
push edi
lea eax, [esp + 0xa8]
push ecx
lea esi, [esp + 0xa8]
mov dword [esp + 0xa8], eax
mov byte [esp + 0xac], 0
call fcn.00428e20
mov byte [esp + 0x26c], 1
cmp byte [0x664959], 0
je 0x458b43
mov ebp, dword [0x66bde8]
jmp 0x458b5c
mov edx, dword [esp + 0x58]
mov edi, dword [esp + 0xa0]
push 2
push ebx
push edx
call fcn.004499d0
add esp, 0xc
mov ebp, eax
cmp ebp, ebx
jne 0x458b95
mov eax, dword [esp + 0xa0]
lea ecx, [esp + 0xa4]
cmp eax, ecx
je 0x458b7b
push eax
call fcn.0049b045
add esp, 4
mov dword [esp + 0x26c], 0xffffffff
mov eax, dword [esp + 0x58]
lea edx, [esp + 0x5c]
cmp eax, edx
jmp 0x458a66
mov ecx, dword [esp + 0x274]
or edi, 0xffffffff
push edi
lea eax, [esp + 0xf0]
push ecx
lea esi, [esp + 0xf0]
mov dword [esp + 0x20], ebx
mov dword [esp + 0xf0], eax
mov byte [esp + 0xf4], 0
call fcn.00428e20
mov edx, esi
push edx
mov edx, 0x637a14
mov ecx, 0x6350f8
mov byte [esp + 0x270], 2
call fcn.00429240
cmp dword [ebp], 1
je 0x458bf3
mov dword [0x66be20], 0x80000
jmp 0x458c19
mov edx, dword [esp + 0xe8]
mov esi, dword [ebp + 4]
lea eax, [esp + 0x130]
push eax
lea ecx, [esp + 0x1c]
push ecx
push edx
call fcn.004497d0
mov dword [0x66be20], eax
cmp eax, ebx
je 0x458c58
mov eax, dword [esp + 0xe8]
lea ecx, [esp + 0xec]
cmp eax, ecx
je 0x458c34
push eax
call fcn.0049b045
add esp, 4
mov eax, dword [esp + 0xa0]
lea edx, [esp + 0xa4]
cmp eax, edx
je 0x458a55
push eax
call fcn.0049b045
add esp, 4
jmp 0x458a55
mov esi, dword [esp + 0x258]
cmp esi, ebx
jne 0x458caf
mov eax, dword [esp + 0xe8]
lea edx, [esp + 0xec]
cmp eax, edx
je 0x458c7e
push eax
call fcn.0049b045
add esp, 4
mov eax, dword [esp + 0xa0]
lea ecx, [esp + 0xa4]
cmp eax, ecx
je 0x458c99
push eax
call fcn.0049b045
add esp, 4
mov dword [esp + 0x26c], edi
mov eax, dword [esp + 0x58]
lea edx, [esp + 0x5c]
cmp eax, edx
jmp 0x458a66
push esi
call fcn.0048fcef
add esp, 4
cmp dword [ebp], 1
mov edi, eax
je 0x458ccc
mov dword [0x66be20], 0x80000
jmp 0x458cec
mov ecx, dword [esp + 0x18]
mov eax, dword [ebp + 4]
push esi
push edi
push ecx
push eax
call fcn.004498a0
mov dword [0x66be20], eax
cmp eax, ebx
je 0x458d2b
cmp eax, 0x600
je 0x458d2b
push edi
call fcn.0048fcfa
add esp, 4
cmp byte [0x664959], 0
jne 0x458d07
push ebp
call fcn.00449b20
add esp, 4
mov eax, dword [esp + 0xe8]
lea edx, [esp + 0xec]
cmp eax, edx
je 0x458b60
push eax
call fcn.0049b045
add esp, 4
jmp 0x458b60
cmp byte [0x664959], 0
jne 0x458d3d
push ebp
call fcn.00449b20
add esp, 4
mov eax, dword [esp + 0xe8]
lea ecx, [esp + 0xec]
cmp eax, ecx
je 0x458d58
push eax
call fcn.0049b045
add esp, 4
mov eax, dword [esp + 0xa0]
lea edx, [esp + 0xa4]
cmp eax, edx
je 0x458d73
push eax
call fcn.0049b045
add esp, 4
mov dword [esp + 0x26c], 0xffffffff
mov eax, dword [esp + 0x58]
lea ecx, [esp + 0x5c]
cmp eax, ecx
je 0x458def
push eax
call fcn.0049b045
add esp, 4
jmp 0x458def
cmp eax, ebx
jne 0x458d9e
call fcn.0042b180
mov edx, dword [esp + 0x274]
push ecx
mov edi, eax
push edx
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
cmp esi, ebx
je 0x458df3
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebp, eax
cmp ebp, ebx
je 0x458df3
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
cmp esi, ebx
je 0x458df3
push esi
call fcn.0048fcef
add esp, 4
push esi
push ebp
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push edi
call fcn.004a26d0
add esp, 0xc
cmp edi, ebx
jne 0x458e6c
mov eax, dword [esp + 0x274]
push ebx
push 0x80
push 3
push ebx
push 1
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x458e65
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
je 0x458e65
push esi
mov dword [esp + 0x2c], ebx
call fcn.0048fcef
add esp, 4
push ebx
lea ecx, [esp + 0x2c]
push ecx
push esi
mov edi, eax
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x28], esi
je 0x458e61
push edi
call fcn.0048fcfa
add esp, 4
xor eax, eax
jmp 0x45903f
cmp edi, ebx
jne 0x458e6c
xor eax, eax
jmp 0x45903f
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x24]
push eax
push esi
lea edx, [esp + 0x30]
mov ecx, edi
call fcn.0044a150
add esp, 0xc
mov esi, eax
push edi
mov dword [esp + 0x20], esi
call fcn.0048fcfa
add esp, 4
cmp esi, ebx
je 0x458e65
push 0x2c
lea ecx, [esp + 0x30]
push ebx
push ecx
call fcn.004a0660
mov edi, dword [esp + 0x30]
mov esi, dword [esp + 0x2c]
add esp, 0xc
push 0
mov ebp, edi
mov eax, 1
imul ebp, esi
push 0
mov word [esp + 0x40], ax
lea eax, [esp + 0x1c]
push eax
mov ecx, 0x20
mov edx, esi
neg edx
mov word [esp + 0x46], cx
push 0
lea ecx, [esp + 0x3c]
mov dword [esp + 0x44], edx
push ecx
lea edx, [ebp*4]
mov dword [esp + 0x50], ebx
push 0
mov dword [esp + 0x44], 0x28
mov dword [esp + 0x48], edi
mov dword [esp + 0x58], edx
xor bl, bl
mov dword [esp + 0x2c], 0
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [esp + 0x18], eax
test eax, eax
je 0x458e65
xor ecx, ecx
test ebp, ebp
jle 0x458ffb
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
add esi, 3
nop
mov dl, byte [esi]
mov byte [eax + ecx*4 + 3], dl
mov edi, dword [esp + 0x14]
cmp byte [edi + ecx*4 + 3], 0xff
jae 0x458f94
movzx eax, byte [esi]
movzx edx, byte [esi - 1]
imul edx, eax
mov eax, 0x80808081
mul edx
shr edx, 7
mov byte [edi + ecx*4], dl
movzx eax, byte [esi]
movzx edx, byte [esi - 2]
imul edx, eax
mov eax, 0x80808081
mul edx
mov eax, dword [esp + 0x14]
shr edx, 7
mov byte [eax + ecx*4 + 1], dl
movzx eax, byte [esi]
movzx edx, byte [esi - 3]
imul edx, eax
mov eax, 0x80808081
mul edx
mov eax, dword [esp + 0x14]
shr edx, 7
mov byte [eax + ecx*4 + 2], dl
mov bl, 1
jmp 0x458fb2
mov dl, byte [esi - 1]
mov byte [edi + ecx*4], dl
movzx eax, byte [esi - 2]
mov edx, dword [esp + 0x14]
mov byte [edx + ecx*4 + 1], al
movzx eax, byte [esi - 3]
mov edx, dword [esp + 0x14]
mov byte [edx + ecx*4 + 2], al
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x278]
cmp dword [eax + ecx*4], edx
jne 0x458fe7
mov byte [eax + ecx*4], 0
mov eax, dword [esp + 0x14]
mov byte [eax + ecx*4 + 1], 0
mov edx, dword [esp + 0x14]
mov byte [edx + ecx*4 + 2], 0
mov eax, dword [esp + 0x14]
mov byte [eax + ecx*4 + 3], 0
mov eax, dword [esp + 0x14]
mov bl, 1
inc ecx
add esi, 4
cmp ecx, ebp
jl 0x458f30
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0049b045
add esp, 4
push 0x64
call fcn.0048fcc0
xor edx, edx
add esp, 4
cmp eax, edx
je 0x459027
lea ecx, [eax + 0x20]
mov dword [eax + 0x1c], ecx
mov byte [ecx], dl
mov dword [eax], edx
mov dword [eax + 4], edx
jmp 0x459029
xor eax, eax
mov dword [eax + 8], edx
mov dword [eax + 0xc], edx
mov edx, dword [esp + 0x18]
mov dword [eax + 4], edx
mov dword [eax + 0x10], edi
mov dword [eax + 0x14], esi
mov byte [eax + 0x18], bl
mov ecx, dword [esp + 0x264]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x24c]
xor ecx, esp
call fcn.00499a1c
add esp, 0x25c
ret