Function at 0x590320
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
sub esp, 0x2e4
push ebx
push ebp
push esi
push edi
mov esi, eax
push str.WBMP
xor ebp, ebp
push str.Encoding__s_image
lea eax, [esp + 0xf0]
mov word [esp + 0xf0], bp
call fcn.00483050
mov eax, dword [esi]
mov edx, dword [eax + 0x20]
add esp, 8
push ebp
lea ecx, [esp + 0xec]
push ecx
mov ecx, esi
call edx
mov ebx, dword [esp + 0x2fc]
mov esi, dword [ebx]
mov edi, dword [esi + 4]
mov ecx, dword [esi + 8]
mov eax, 1
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x48], 0xffffffff
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x50], ebp
mov dword [esp + 0x64], ebp
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x60], ebp
mov dword [esp + 0x68], ebp
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x80], ebp
mov dword [esp + 0x70], ebp
mov dword [esp + 0x74], ebp
mov dword [esp + 0x78], ebp
mov dword [esp + 0x7c], ebp
mov dword [esp + 0x84], ebp
mov dword [esp + 0x88], ebp
mov dword [esp + 0x8c], ebp
mov dword [esp + 0x90], ebp
mov dword [esp + 0x94], ebp
cmp dword [esi], eax
mov dword [esp + 0x2c], edi
mov dword [esp + 0x20], ecx
je 0x59044b
push ecx
lea ecx, [esp + 0xac]
push ecx
mov ecx, edi
call fcn.004d3de0
push ebp
push ebp
push ebp
lea eax, [esp + 0xb4]
lea edi, [esp + 0x54]
call fcn.004d0d70
cmp dword [esp + 0x88], ebp
je 0x590426
cmp dword [esp + 0x48], 0xffffffff
je 0x590426
cmp dword [esp + 0x4c], ebp
jle 0x590426
cmp dword [esp + 0x50], ebp
jg 0x590438
mov esi, dword [esp + 0x2f8]
mov dword [esi], 2
jmp 0x5907be
mov edx, esi
lea ecx, [esp + 0x48]
call fcn.004d6750
mov edi, dword [esp + 0x2c]
lea esi, [esp + 0x48]
lea edx, [esp + 0x14]
push edx
push ebx
xor eax, eax
call fcn.005bf890
mov eax, dword [esp + 0x14]
cmp eax, ebp
je 0x59046e
mov esi, dword [esp + 0x2f8]
mov dword [esi], eax
jmp 0x5907be
mov edx, dword [ebx + 4]
push ebp
lea eax, [esp + 0x18]
push eax
push 1
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1c], 0
mov eax, dword [edx + 0x10]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esp + 0x14], 1
jne 0x590426
lea ecx, [esp + 0x24]
push ecx
push ebx
mov eax, edi
call fcn.005bf890
mov eax, dword [eax]
cmp eax, ebp
jne 0x590460
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x24]
push edx
push ebx
call fcn.005bf890
mov eax, dword [eax]
cmp eax, ebp
jne 0x590460
mov eax, edi
shr eax, 3
lea ecx, [eax*8]
cmp ecx, edi
mov dword [esp + 0x20], eax
jae 0x5904d7
add eax, 1
mov dword [esp + 0x20], eax
push eax
call fcn.0069c0de
add esp, 4
mov ebx, eax
push ebp
mov eax, esi
lea edi, [esp + 0x3c]
mov dword [esp + 0x2c], ebp
call fcn.004d3900
mov eax, dword [esp + 0x40]
fld qword [0x7235f0]
cmp eax, ebp
je 0x5907aa
cmp eax, dword [esp + 0x38]
jb 0x5907aa
cmp eax, dword [esp + 0x3c]
ja 0x5907aa
mov esi, dword [esp + 0x20]
cmp esi, ebp
jbe 0x590533
push esi
fstp st(0)
push ebp
push ebx
call fcn.006a1300
fld qword [0x7235f0]
add esp, 0xc
xor edi, edi
cmp dword [esp + 0x2c], ebp
jbe 0x59076a
mov eax, dword [esp + 0x40]
add eax, 2
mov dword [esp + 0x14], eax
jmp 0x590556
fld qword [0x7235f0]
movzx edx, byte [eax - 2]
movzx ecx, byte [eax - 1]
mov dword [esp + 0x18], edx
movzx edx, byte [eax]
fild dword [esp + 0x18]
mov eax, dword fs:[0x2c]
mov dword [esp + 0x18], ecx
fmul st(1)
mov ecx, dword [eax]
cmp byte [ecx + 1], 0
fmul qword [0x7236f0]
fild dword [esp + 0x18]
mov dword [esp + 0x18], edx
fmul st(2)
fmul qword [0x7236e8]
faddp st(1)
fild dword [esp + 0x18]
fmulp st(2)
fxch st(1)
fmul qword [0x7236e0]
faddp st(1)
fstp qword [esp + 0x98]
jne 0x5905ec
push ebp
call fcn.0069c84d
add esp, 4
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor esi, eax
xor esi, ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
shl eax, 0x12
xor esi, eax
push esi
call fcn.0069d15e
mov edx, dword fs:[0x2c]
mov eax, dword [edx]
add esp, 4
mov byte [eax + 1], 1
xor ebp, ebp
call fcn.0069d16b
cdq
mov ecx, 0x3e8
idiv ecx
mov dword [esp + 0x18], edx
fild dword [esp + 0x18]
fmul qword [0x723e88]
fld qword [0x723578]
fsub st(1), st(0)
fld1
fadd st(2), st(0)
fxch st(2)
fmul st(1)
fstp qword [esp + 0xa0]
fldz
fld st(0)
fst qword [esp + 0x30]
fld qword [0x723610]
fld qword [esp + 0x98]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
jnp 0x590665
fld qword [0x723960]
fcomp st(1)
fnstsw ax
test ah, 0x41
jp 0x590695
mov edx, edi
shr edx, 3
lea eax, [edx + ebx]
mov ecx, edi
and ecx, 7
mov edx, 0x80
sar edx, cl
or byte [eax], dl
xor ebp, ebp
fstp st(0)
fstp st(3)
fstp st(1)
fstp st(1)
fstp st(0)
mov eax, dword [esp + 0x14]
add dword [esp + 0x28], 1
add edi, 1
add eax, 3
cmp edi, dword [esp + 0x2c]
mov dword [esp + 0x14], eax
jb 0x590550
mov esi, dword [esp + 0x20]
jmp 0x59076c
fcom st(3)
fnstsw ax
test ah, 5
jp 0x5906b2
fstp st(3)
fstp st(0)
fstp st(0)
fld st(1)
fst qword [esp + 0x30]
fxch st(2)
fsub st(1)
fdivrp st(1)
jmp 0x5906d3
fcom st(3)
fnstsw ax
fstp st(3)
test ah, 1
jne 0x5906cd
fstp st(0)
fstp st(0)
fld st(1)
fsub st(1)
fdivp st(1)
fst qword [esp + 0x30]
jmp 0x5906d1
fstp st(2)
fstp st(2)
fxch st(1)
mov eax, dword [esp + 0x28]
faddp st(1)
test eax, eax
fild dword [esp + 0x28]
jge 0x5906e7
fadd qword [0x7235b8]
fld st(0)
fdiv st(2)
call fcn.006b24a0
mov ecx, dword fs:[0x2c]
mov edx, dword [ecx]
cmp byte [edx + 1], 0
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fmulp st(2)
fsubrp st(1)
fstp qword [esp + 0x18]
jne 0x590714
call fcn.004af060
call fcn.0069d16b
test eax, 0x4000
je 0x59074f
fld qword [esp + 0x30]
fcomp qword [esp + 0x18]
fnstsw ax
test ah, 0x41
jne 0x59066f
mov ecx, edi
and ecx, 7
mov edx, 0x80
mov eax, edi
sar edx, cl
shr eax, 3
add eax, ebx
or byte [eax], dl
xor ebp, ebp
jmp 0x59066f
fld qword [esp + 0xa0]
fcomp qword [esp + 0x98]
fnstsw ax
test ah, 5
jp 0x59066f
jmp 0x590733
fstp st(0)
mov ecx, dword [esp + 0x2fc]
mov edx, dword [ecx + 4]
push ebp
lea eax, [esp + 0x28]
push eax
mov eax, dword [edx + 0x10]
push esi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esp + 0x24], esi
jne 0x59079b
mov ecx, dword [esp + 0x44]
add dword [esp + 0x40], ecx
jmp 0x5904f2
mov esi, dword [esp + 0x2f8]
mov dword [esi], 2
jmp 0x5907b5
mov esi, dword [esp + 0x2f8]
fstp st(0)
mov dword [esi], ebp
push ebx
call fcn.0069c8fa
add esp, 4
lea ecx, [esp + 0x48]
call fcn.004d0c50
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x2e4
ret 8