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

Disassembly:
sub esp, 0x298
push ebx
push ebp
push esi
push edi
push 0x6e18f8
xor ebp, ebp
push str.Encoding__s_image
lea eax, [esp + 0xa8]
mov word [esp + 0xa8], bp
call fcn.00483050
mov ecx, dword [esp + 0x2b8]
mov eax, dword [ecx]
mov eax, dword [eax + 0x20]
add esp, 8
push ebp
lea edx, [esp + 0xa4]
push edx
call eax
mov esi, dword [esp + 0x2b4]
mov ecx, dword [esi]
mov edx, dword [ecx + 0x14]
fild dword [ecx + 0x14]
test edx, edx
mov ebx, dword [ecx + 4]
mov edi, dword [ecx + 8]
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], edi
jge 0x58ea1b
fadd qword [0x7235b8]
fld qword [0x723bf8]
fnstcw word [esp + 0x14]
movzx eax, word [esp + 0x14]
or eax, 0xc00
fmul st(1), st(0)
mov dword [esp + 0x10], eax
fxch st(1)
fldcw word [esp + 0x10]
mov eax, dword [ecx + 0xc]
fistp qword [esp + 0x50]
mov edx, dword [esp + 0x50]
mov dword [esp + 0x50], eax
mov eax, dword [ecx + 0x10]
cmp eax, ebp
fldcw word [esp + 0x14]
mov dword [esp + 0x54], eax
jne 0x58ea61
fld qword [0x723758]
jmp 0x58ea74
fild dword [esp + 0x50]
fidiv dword [esp + 0x54]
fldz
fcomp st(1)
fnstsw ax
test ah, 5
jp 0x58eaac
mov edx, dword [ecx + 0x18]
fild dword [ecx + 0x18]
test edx, edx
jge 0x58ea84
fadd qword [0x7235b8]
fmul st(2)
fnstcw word [esp + 0x14]
movzx eax, word [esp + 0x14]
fdivrp st(1)
or eax, 0xc00
mov dword [esp + 0x10], eax
fldcw word [esp + 0x10]
fistp qword [esp + 0x50]
mov edx, dword [esp + 0x50]
fldcw word [esp + 0x14]
jmp 0x58eaae
fstp st(0)
mov ecx, dword [ecx + 0x18]
add edi, 0xffffffff
test ecx, ecx
lea eax, [ebx - 1]
mov dword [esp + 0x4c], ecx
fild dword [esp + 0x4c]
mov byte [esp + 0x5c], 0xa
mov byte [esp + 0x5d], 5
mov byte [esp + 0x5e], 1
mov byte [esp + 0x5f], 8
mov word [esp + 0x60], bp
mov word [esp + 0x62], bp
mov word [esp + 0x64], ax
mov word [esp + 0x66], di
mov word [esp + 0x68], dx
jge 0x58eaf6
fadd qword [0x7235b8]
fnstcw word [esp + 0x14]
movzx eax, word [esp + 0x14]
or eax, 0xc00
fmulp st(1)
mov dword [esp + 0x10], eax
movzx eax, bl
fldcw word [esp + 0x10]
and eax, 1
lea ecx, [esp + 0x10]
add eax, ebx
fistp dword [esp + 0x10]
mov dx, word [esp + 0x10]
push ecx
lea edi, [esp + 0x60]
mov word [esp + 0x6e], dx
mov byte [esp + 0x70], 3
mov word [esp + 0x71], ax
fldcw word [esp + 0x18]
call fcn.005be5e0
mov eax, dword [esp + 0x10]
cmp eax, ebp
je 0x58eb60
mov ecx, dword [esp + 0x2ac]
mov dword [ecx], eax
mov eax, ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x298
ret 0xc
movzx esi, word [esp + 0x6d]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x2a], ebp
mov dword [esp + 0x2e], ebp
mov dword [esp + 0x32], ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], ebp
mov byte [esp + 0x28], 0
mov byte [esp + 0x29], 0
mov byte [esp + 0x36], 0
mov byte [esp + 0x37], 0
mov byte [esp + 0x44], 0
mov byte [esp + 0x45], 0
lea esi, [esi + esi + 1]
lea edi, [esp + 0x24]
mov ebp, 3
mov edx, dword [edi - 8]
push edx
call fcn.0069c8fa
add esp, 4
push esi
call fcn.0069c0de
mov dword [edi - 8], eax
mov dword [edi - 4], 0
mov dword [edi], 0
mov byte [edi + 4], 0
mov byte [edi + 5], 0
add esp, 4
add edi, 0xe
sub ebp, 1
jne 0x58ebb4
xor eax, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x48], eax
push eax
mov eax, dword [esp + 0x2b8]
mov edi, dword [eax]
lea eax, [esp + 0x7c]
call fcn.004d2430
mov ecx, dword [esp + 0x8c]
cmp ecx, dword [esp + 0x78]
jae 0x58ef82
mov esi, dword [esp + 0x38]
mov ebp, dword [esp + 0x2a]
mov bl, byte [esp + 0x29]
jmp 0x58ec30
lea edx, [esp + 0x78]
lea ecx, [esp + 0x50]
call dword [esp + 0x98]
mov edi, dword [eax]
mov eax, edi
mov ecx, edi
mov dword [esp + 0x18], edi
mov edi, 1
add dword [esp + 0x24], edi
shr ecx, 8
shr eax, 0x10
test bl, bl
mov byte [esp + 0x15], cl
je 0x58eccb
mov dl, byte [esp + 0x28]
cmp al, dl
jne 0x58ec91
add bl, 1
cmp bl, 0x3f
mov byte [esp + 0x29], bl
jne 0x58ecd5
mov ecx, dword [esp + 0x20]
mov eax, ecx
add ecx, 2
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x1c]
mov byte [ecx + eax], 0xff
mov byte [ecx + eax + 1], dl
xor bl, bl
jmp 0x58ecd1
cmp bl, 1
mov ecx, dword [esp + 0x20]
jne 0x58ecb3
and dl, 0xc0
cmp dl, 0xc0
mov dl, byte [esp + 0x28]
je 0x58ecb3
add dword [esp + 0x20], edi
mov edi, dword [esp + 0x1c]
mov byte [edi + ecx], dl
jmp 0x58ecc6
add dword [esp + 0x20], 2
mov edi, dword [esp + 0x1c]
or bl, 0xc0
mov byte [edi + ecx], bl
mov byte [edi + ecx + 1], dl
mov edi, 1
mov bl, 1
mov byte [esp + 0x28], al
mov byte [esp + 0x29], bl
mov cl, byte [esp + 0x37]
add dword [esp + 0x32], edi
test cl, cl
je 0x58ed47
mov dl, byte [esp + 0x36]
cmp byte [esp + 0x15], dl
jne 0x58ed15
add cl, 1
cmp cl, 0x3f
mov byte [esp + 0x37], cl
jne 0x58ed54
mov ecx, dword [esp + 0x2e]
mov eax, ecx
add ecx, 2
mov dword [esp + 0x2e], ecx
mov cl, dl
mov byte [eax + ebp], 0xff
mov byte [eax + ebp + 1], cl
mov byte [esp + 0x37], 0
jmp 0x58ed54
cmp cl, 1
mov eax, dword [esp + 0x2e]
jne 0x58ed33
and dl, 0xc0
cmp dl, 0xc0
mov dl, byte [esp + 0x36]
je 0x58ed33
add dword [esp + 0x2e], edi
mov byte [eax + ebp], dl
jmp 0x58ed42
add dword [esp + 0x2e], 2
or cl, 0xc0
mov byte [eax + ebp], cl
mov byte [eax + ebp + 1], dl
mov edi, 1
mov al, byte [esp + 0x15]
mov byte [esp + 0x37], 1
mov byte [esp + 0x36], al
mov cl, byte [esp + 0x45]
add dword [esp + 0x40], edi
test cl, cl
jne 0x58ed6a
mov cl, byte [esp + 0x18]
mov byte [esp + 0x44], cl
jmp 0x58edda
mov dl, byte [esp + 0x44]
cmp byte [esp + 0x18], dl
jne 0x58ed9c
add cl, 1
cmp cl, 0x3f
mov byte [esp + 0x45], cl
jne 0x58eddf
mov ecx, dword [esp + 0x3c]
mov eax, ecx
add ecx, 2
mov byte [esi + eax], 0xff
mov dword [esp + 0x3c], ecx
mov byte [esi + eax + 1], dl
mov byte [esp + 0x45], 0
jmp 0x58eddf
cmp cl, 1
mov eax, dword [esp + 0x3c]
jne 0x58edbe
and dl, 0xc0
cmp dl, 0xc0
je 0x58edba
mov cl, byte [esp + 0x44]
add dword [esp + 0x3c], edi
mov byte [esi + eax], cl
jmp 0x58edcd
mov dl, byte [esp + 0x44]
add dword [esp + 0x3c], 2
or cl, 0xc0
mov byte [esi + eax], cl
mov byte [esi + eax + 1], dl
mov dl, byte [esp + 0x18]
mov byte [esp + 0x44], dl
mov edi, 1
mov byte [esp + 0x45], 1
mov eax, dword [esp + 0x48]
add eax, edi
cmp eax, dword [esp + 0x70]
mov dword [esp + 0x48], eax
jb 0x58ef1c
xor ebx, ebx
mov dword [esp + 0x18], ebx
lea edi, [esp + 0x29]
lea ecx, [ecx]
mov eax, dword [esp + 0x2b4]
mov esi, dword [eax + 4]
mov al, byte [edi]
test al, al
mov dword [esp + 0x48], ebx
jbe 0x58ee52
cmp al, 1
mov ecx, dword [edi - 9]
jne 0x58ee3a
mov dl, byte [edi - 1]
mov bl, dl
and bl, 0xc0
cmp bl, 0xc0
je 0x58ee38
lea eax, [ecx + 1]
mov dword [edi - 9], eax
mov eax, dword [edi - 0xd]
mov byte [ecx + eax], dl
xor ebx, ebx
jmp 0x58ee4f
xor ebx, ebx
lea edx, [ecx + 2]
mov dword [edi - 9], edx
mov edx, dword [edi - 0xd]
add ecx, edx
or al, 0xc0
mov byte [ecx], al
mov al, byte [edi - 1]
mov byte [ecx + 1], al
mov byte [edi], 0
test byte [edi - 5], 1
je 0x58ee68
mov eax, dword [edi - 9]
mov edx, dword [edi - 0xd]
lea ecx, [eax + 1]
mov dword [edi - 9], ecx
mov byte [eax + edx], 0
mov ebp, dword [edi - 9]
mov ecx, dword [edi - 0xd]
mov edx, dword [esi + 0x10]
push ebx
lea eax, [esp + 0x50]
push eax
push ebp
push ecx
push edx
mov dword [edi - 5], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esp + 0x4c], ebp
je 0x58ee91
mov dword [esp + 0x48], 2
cmp dword [esp + 0x48], ebx
mov dword [edi - 9], ebx
jne 0x58efbb
mov eax, dword [esp + 0x18]
add eax, 1
add edi, 0xe
cmp eax, 3
mov dword [esp + 0x18], eax
jb 0x58ee00
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x2b0]
mov edx, dword [edi]
add eax, 1
test eax, eax
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
mov dword [esp + 0x48], ebx
mov dword [esp + 0x10], eax
jge 0x58eedf
fadd qword [0x7235b8]
mov eax, dword [esp + 0x74]
fild dword [esp + 0x74]
test eax, eax
jge 0x58eef1
fadd qword [0x7235b8]
fdivp st(1)
mov edx, dword [edx + 0x24]
sub esp, 8
mov ecx, edi
fstp qword [esp]
call edx
mov eax, dword [edi]
mov edx, dword [eax]
mov ecx, edi
call edx
test al, al
jne 0x58eff4
mov esi, dword [esp + 0x38]
mov ebp, dword [esp + 0x2a]
mov bl, byte [esp + 0x29]
mov edx, dword [esp + 0x8c]
mov edi, dword [esp + 0x78]
cmp edx, edi
jae 0x58ef82
mov eax, dword [esp + 0x90]
mov ecx, dword [esp + 0x94]
add eax, dword [esp + 0x84]
add ecx, 1
add edx, 1
cmp ecx, dword [esp + 0x7c]
mov dword [esp + 0x90], eax
mov dword [esp + 0x94], ecx
mov dword [esp + 0x8c], edx
jne 0x58ef7a
add eax, dword [esp + 0x80]
mov dword [esp + 0x94], 0
mov dword [esp + 0x90], eax
cmp edx, edi
jb 0x58ec30
mov ebx, dword [esp + 0x2ac]
mov dword [ebx], 0
lea esi, [esp + 0x46]
mov edi, 2
mov eax, dword [esi - 0xe]
sub esi, 0xe
push eax
call fcn.0069c8fa
add esp, 4
sub edi, 1
jns 0x58ef98
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x298
ret 0xc
mov ebx, dword [esp + 0x2ac]
mov eax, dword [esp + 0x48]
mov dword [ebx], eax
lea esi, [esp + 0x46]
mov edi, 2
mov ecx, dword [esi - 0xe]
sub esi, 0xe
push ecx
call fcn.0069c8fa
add esp, 4
sub edi, 1
jns 0x58efd1
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x298
ret 0xc
mov ebx, dword [esp + 0x2ac]
mov dword [ebx], 1
lea esi, [esp + 0x46]
mov edi, 2
lea ebx, [ebx]
mov edx, dword [esi - 0xe]
sub esi, 0xe
push edx
call fcn.0069c8fa
add esp, 4
sub edi, 1
jns 0x58f010
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x298
ret 0xc