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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x2b4
push ebx
push esi
push edi
push 0x70b470
xor ebx, ebx
push str.Encoding__s_image
lea eax, [esp + 0xc0]
mov word [esp + 0xc0], bx
call fcn.00483050
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
mov eax, dword [eax + 0x20]
add esp, 8
push ebx
lea edx, [esp + 0xbc]
push edx
call eax
mov edi, dword [ebp + 0x10]
mov eax, dword [edi + 8]
push 1
lea esi, [esp + 0x34]
push esi
xor edx, edx
xor ecx, ecx
push edx
add eax, 0x10
push ecx
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x5bd652
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
jmp 0x5bd662
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], eax
push 0x38
lea ecx, [esp + 0x80]
push ebx
push ecx
call fcn.006a1300
mov eax, dword [edi + 4]
mov esi, dword [edi]
add esp, 0xc
cmp eax, ebx
je 0x5bd69a
cmp eax, 1
je 0x5bd69a
cmp eax, 2
je 0x5bd69a
mov eax, dword [ebp + 8]
mov dword [eax], 2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [esi + 8]
mov edx, dword [esi + 4]
mov ecx, dword [esi + 0x14]
mov dword [esp + 0x84], eax
mov eax, dword [esi + 0x10]
cmp eax, ebx
mov dword [esp + 0x80], edx
mov edx, dword [esi + 0xc]
mov dword [esp + 0x94], ecx
mov ecx, dword [esi + 0x18]
mov dword [esp + 0x98], ecx
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], eax
jne 0x5bd6dc
fld qword [0x723758]
jmp 0x5bd6ef
fild dword [esp + 0x30]
fidiv dword [esp + 0x34]
fldz
fcomp st(1)
fnstsw ax
test ah, 5
jp 0x5bd739
test ecx, ecx
mov dword [esp + 0x38], ecx
fild dword [esp + 0x38]
jge 0x5bd701
fadd qword [0x7235b8]
fdivrp st(1)
sub esp, 8
fstp qword [esp]
call fcn.00401610
fnstcw word [esp + 0x28]
movzx eax, word [esp + 0x28]
or eax, 0xc00
mov dword [esp + 0x2c], eax
fldcw word [esp + 0x2c]
fistp qword [esp + 0x30]
mov eax, dword [esp + 0x30]
mov dword [esp + 0x94], eax
fldcw word [esp + 0x28]
jmp 0x5bd73b
fstp st(0)
mov eax, dword [edi + 4]
cmp eax, ebx
jne 0x5bd759
mov word [esp + 0x8a], 0x20
mov dword [esp + 0x8c], 3
jmp 0x5bd775
sub eax, 0xc
neg eax
sbb eax, eax
and eax, 0x10
add eax, 8
mov word [esp + 0x8a], ax
mov dword [esp + 0x8c], ebx
lea ecx, [esp + 0x2c]
push ecx
lea eax, [esp + 0x80]
call fcn.005c5ea0
mov ecx, dword [esp + 0x2c]
cmp ecx, ebx
je 0x5bd79c
mov eax, dword [ebp + 8]
mov dword [eax], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
movzx ebx, word [esp + 0x8a]
imul ebx, dword [esp + 0x80]
add ebx, 7
shr ebx, 3
lea eax, [ebx + 3]
and eax, 0xfffffffc
push eax
mov dword [esp + 0x30], eax
call fcn.0069c0de
mov edx, dword [edi + 8]
add esp, 4
add edx, 0x10
push edx
mov dword [esp + 0x2c], eax
call fcn.00496ff0
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x8c]
test eax, eax
je 0x5bd7ed
cmp eax, 3
jne 0x5bd97d
push 5
mov edi, esi
lea eax, [esp + 0x54]
call fcn.004d2430
mov eax, dword [esp + 0x74]
xor esi, esi
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x2c]
sub eax, ebx
cmp dword [esp + 0x50], esi
mov dword [esp + 0x6c], esi
mov dword [esp + 0x64], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x78], eax
mov dword [esp + 0x40], esi
jbe 0x5bd97a
lea edx, [esp + 0x50]
lea ecx, [esp + 0xb4]
call dword [esp + 0x70]
mov ecx, dword [esp + 0x64]
cmp ecx, dword [esp + 0x50]
mov eax, dword [eax]
jae 0x5bd875
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x6c]
add ecx, dword [esp + 0x5c]
add dword [esp + 0x64], 1
add edx, 1
cmp edx, dword [esp + 0x54]
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], edx
jne 0x5bd875
add ecx, dword [esp + 0x58]
mov dword [esp + 0x6c], 0
mov dword [esp + 0x68], ecx
mov cx, word [esp + 0x8a]
cmp cx, 0x18
mov edi, dword [esp + 0x28]
jb 0x5bd8b2
mov byte [esi + edi], al
add esi, 1
mov edx, eax
shr edx, 8
mov byte [esi + edi], dl
add esi, 1
mov edx, eax
shr edx, 0x10
mov byte [esi + edi], dl
add esi, 1
cmp cx, 0x20
jne 0x5bd8b2
shr eax, 0x18
mov byte [esi + edi], al
add esi, 1
mov eax, dword [esp + 0x3c]
add eax, 1
cmp eax, dword [esp + 0x80]
mov dword [esp + 0x3c], eax
jne 0x5bd96c
mov eax, dword [esp + 0x78]
push eax
push 0
add esi, edi
push esi
call fcn.006a1300
mov edx, dword [ebp + 0x10]
mov esi, dword [esp + 0x38]
mov eax, dword [edx + 8]
add esp, 0xc
push 0
lea ecx, [esp + 0x48]
push ecx
mov ecx, dword [eax + 0x10]
push esi
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esp + 0x44], esi
jne 0x5bd9e8
add dword [esp + 0x40], 1
mov eax, dword [esp + 0x40]
fild dword [esp + 0x40]
mov ebx, dword [ebp + 0xc]
mov edx, dword [ebx]
xor esi, esi
test eax, eax
mov dword [esp + 0x3c], 0
jge 0x5bd929
fadd qword [0x7235b8]
mov ecx, dword [esp + 0x84]
fild dword [esp + 0x84]
test ecx, ecx
jge 0x5bd941
fadd qword [0x7235b8]
fdivp st(1)
mov edx, dword [edx + 0x24]
sub esp, 8
mov ecx, ebx
fmul qword [0x7235d0]
fadd qword [0x723b28]
fstp qword [esp]
call edx
mov eax, dword [ebx]
mov edx, dword [eax]
mov ecx, ebx
call edx
test al, al
jne 0x5bda05
mov eax, dword [esp + 0x50]
cmp dword [esp + 0x64], eax
jb 0x5bd828
mov edi, dword [ebp + 0x10]
mov edx, dword [edi + 8]
mov ecx, dword [esp + 0x9c]
add edx, 0x10
push edx
mov dword [edi + 0xc], ecx
call fcn.00496ff0
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
xor ecx, ecx
push ecx
mov ebx, eax
mov eax, dword [esp + 0x4c]
push ecx
push ecx
add eax, 0x14
push eax
mov eax, dword [edi + 8]
mov ecx, dword [eax + 0x10]
push ecx
call esi
push 0
mov edx, ebx
sub edx, dword [esp + 0x3c]
lea eax, [esp + 0x48]
push eax
mov dword [esp + 0x40], edx
mov edx, dword [edi + 8]
mov eax, dword [edx + 0x10]
push 4
lea ecx, [esp + 0x44]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esp + 0x44], 4
je 0x5bda22
mov esi, dword [ebp + 8]
mov dword [esi], 2
jmp 0x5bda3a
mov esi, dword [ebp + 8]
push edi
mov dword [esi], 2
call fcn.0069c8fa
mov eax, esi
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov esi, dword [ebp + 8]
push edi
mov dword [esi], 1
call fcn.0069c8fa
mov eax, esi
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [edi + 8]
xor eax, eax
push eax
push eax
push eax
mov eax, dword [edx + 0x10]
push ebx
push eax
call esi
mov esi, dword [ebp + 8]
mov dword [esi], 0
mov ecx, dword [esp + 0x28]
push ecx
call fcn.0069c8fa
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc