Function at 0x58b0c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, ecx
push edi
push esi
push ebx
sub esp, 0x5c
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 0x38], edx
mov ebx, dword [esp + 0x70]
mov edi, eax
mov dword [esp + 0x3c], eax
mov eax, dword [0xd3c044]
mov dword [esp + 0x4c], eax
xor eax, eax
test edi, edi
je 0x58ad04
mov dword [edi], 0
test ebp, ebp
je 0x58af00
test ebx, ebx
je 0x58af00
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x38]
lea esi, [ebp + 0x2e]
mov eax, dword [eax + 0x48]
mov dword [ebx], ecx
mov eax, dword [eax + 0x10]
mov eax, dword [eax + ecx*4]
mov dword [ebx + 0xc], 0
mov dword [ebx + 8], eax
movzx eax, word [ebp + 4]
mov word [ebx + 0x10], ax
movzx eax, word [ebp + 6]
mov word [ebx + 0x12], ax
movzx eax, word [ebp + 8]
mov word [ebx + 0x14], ax
movzx eax, word [ebp + 0xa]
mov word [ebx + 0x16], ax
movzx edx, word [ebp + 0xe]
movzx eax, word [ebp + 0xc]
call fcn.0058a8f0
xor edx, edx
lea ecx, [ebx + 0x50]
mov dword [ebx + 0x450], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x2c], edx
mov dword [ebx + 0x18], eax
mov eax, dword [ebp + 0x14]
mov dword [ebx + 0x24], edx
xor edx, edx
mov dword [ebx + 0x20], eax
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x18]
mov dword [ebx + 0x2c], edx
mov dword [ebx + 0x28], eax
mov dword [esp + 0x20], eax
movzx eax, word [ebp + 0x24]
mov dword [esp + 0x24], edx
xor edx, edx
mov word [ebx + 0x30], ax
mov eax, dword [ebp + 0x26]
mov dword [esp + 0x34], edx
mov dword [ebx + 0x34], eax
mov eax, dword [ebp + 0x2a]
mov dword [ebx + 0x3c], edx
mov edx, 0x1ff
mov dword [esp + 0x30], eax
mov dword [ebx + 0x38], eax
movzx eax, word [ebp + 0x1c]
cmp eax, edx
cmova eax, edx
cmp eax, 4
jb 0x58aed0
mov edx, dword [ebp + 0x2e]
lea edi, [ebx + 0x54]
and edi, 0xfffffffc
mov dword [ebx + 0x50], edx
mov edx, dword [esi + eax - 4]
mov dword [ecx + eax - 4], edx
sub ecx, edi
sub esi, ecx
add ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov byte [ebx + eax + 0x50], 0
movzx eax, word [ebp + 0x20]
mov edx, 0x1ff
lea ecx, [ebx + 0x250]
cmp eax, edx
cmova eax, edx
mov dword [ebx + 0x40], eax
movzx esi, word [ebp + 0x1c]
movzx edx, word [ebp + 0x1e]
lea esi, [esi + edx + 0x2e]
add esi, ebp
cmp eax, 4
jae 0x58af18
test eax, eax
jne 0x58af48
mov edi, dword [esp + 0x38]
mov esi, dword [esp + 0x1c]
mov byte [ebx + eax + 0x250], 0
mov dword [esp + 4], edi
mov dword [esp], esi
call fcn.0058e5e0
mov dword [ebx + 0x44], eax
mov dword [esp + 4], edi
mov dword [esp], esi
call fcn.0058e660
mov dword [ebx + 0x48], eax
mov dword [esp + 4], edi
mov dword [esp], esi
call fcn.0058e6c0
mov edx, dword [esp + 0x20]
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x24]
mov dword [ebx + 0x4c], eax
cmp esi, edx
mov eax, edi
sbb eax, ecx
mov eax, edx
mov edx, ecx
cmovae edx, edi
cmovae eax, esi
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
cmp eax, esi
mov ecx, edx
sbb ecx, edi
cmovb eax, esi
cmovb edx, edi
not eax
or eax, edx
je 0x58af70
mov eax, 1
lea esi, [esi]
nop
mov edx, dword [esp + 0x4c]
sub edx, dword [0xd3c044]
jne 0x58b05f
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
test eax, eax
je 0x58aded
movzx edx, byte [ebp + 0x2e]
mov byte [ebx + 0x50], dl
test al, 2
je 0x58aded
movzx edx, word [esi + eax - 2]
mov word [ecx + eax - 2], dx
jmp 0x58aded
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x58af0f
mov dword [eax + 0x1c], 0x18
xor eax, eax
jmp 0x58aeb0
mov edx, dword [esi]
lea edi, [ebx + 0x254]
and edi, 0xfffffffc
mov dword [ebx + 0x250], edx
mov edx, dword [esi + eax - 4]
mov dword [ecx + eax - 4], edx
sub ecx, edi
sub esi, ecx
add ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
jmp 0x58ae28
movzx edx, byte [esi]
mov byte [ebx + 0x250], dl
test al, 2
je 0x58ae28
movzx edx, word [esi + eax - 2]
mov word [ecx + eax - 2], dx
jmp 0x58ae28
movzx eax, word [ebp + 0x1e]
test eax, eax
je 0x58aea3
movzx edx, word [ebp + 0x1c]
mov edi, 0xfffffffc
lea edx, [ebp + edx + 0x2e]
jmp 0x58afb2
movzx ecx, word [edx + 2]
movzx ebp, word [edx]
lea esi, [ecx + 4]
cmp eax, esi
jb 0x58afb7
cmp bp, 1
je 0x58afd0
add edx, esi
mov esi, edi
sub esi, ecx
add eax, esi
je 0x58aea3
cmp eax, 3
ja 0x58af90
mov eax, dword [esp + 0x1c]
mov dword [eax + 0x1c], 9
xor eax, eax
jmp 0x58aeb0
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x58afde
mov dword [eax], 1
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + 0x24]
lea esi, [edx + 4]
mov eax, edi
not eax
or eax, ebp
je 0x58b02a
mov edi, dword [esp + 0x28]
mov ebp, dword [esp + 0x2c]
mov eax, edi
not eax
or eax, ebp
je 0x58b043
mov edi, dword [esp + 0x30]
mov ebp, dword [esp + 0x34]
mov eax, edi
not eax
or eax, ebp
jne 0x58aea3
cmp ecx, 7
jbe 0x58afb7
mov eax, dword [esi]
mov edx, dword [esi + 4]
mov dword [ebx + 0x38], eax
mov dword [ebx + 0x3c], edx
jmp 0x58aea3
cmp ecx, 7
jbe 0x58afb7
mov esi, dword [edx + 4]
mov edi, dword [edx + 8]
sub ecx, 8
mov dword [ebx + 0x28], esi
lea esi, [edx + 0xc]
mov dword [ebx + 0x2c], edi
jmp 0x58aff1
cmp ecx, 7
jbe 0x58afb7
mov eax, dword [esi]
mov edx, dword [esi + 4]
sub ecx, 8
add esi, 8
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x24], edx
jmp 0x58b001
call fcn.00401690
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
push ebx
sub esp, 0x18
mov ebx, dword [0xd3c044]
mov dword [esp + 0xc], ebx
xor ebx, ebx
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
mov ebx, dword [esp + 0xc]
sub ebx, dword [0xd3c044]
jne 0x58b0b5
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], edx
mov dword [esp + 0x24], 1
mov dword [esp + 0x20], eax
add esp, 0x18
pop ebx
jmp sub.msvcrt.dll_fwrite
call fcn.00401690
nop
nop
nop
nop
nop
nop
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov eax, dword [esp + 0x5c]
mov ebx, dword [esp + 0x50]
mov esi, dword [esp + 0x54]
mov edi, dword [esp + 0x58]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x1c], eax
mov eax, dword [0xd3c044]
mov dword [esp + 0x2c], eax
mov eax, dword [ebx + 0x48]
mov eax, dword [eax + 0x3c]
mov dword [esp], eax
call dword [0x6be4c8]
mov ecx, dword [ebx + 0x48]
add esi, dword [ecx + 0x40]
adc edi, dword [ecx + 0x44]
test edi, edi
js 0x58b170
xor edx, edi
xor eax, esi
mov ebp, dword [ecx + 0x3c]
or eax, edx
je 0x58b133
mov dword [esp + 0xc], 0
mov dword [esp + 4], esi
mov dword [esp + 8], edi
mov dword [esp], ebp
call dword [0x6be4cc]
test eax, eax
jne 0x58b170
mov ecx, dword [ebx + 0x48]
mov eax, dword [esp + 0x2c]
sub eax, dword [0xd3c044]
jne 0x58b18d
mov eax, dword [ecx + 0x3c]
mov dword [esp + 0x54], 1
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x50], eax
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
jmp sub.msvcrt.dll_fwrite
mov dword [ebx + 0x1c], 0x16
mov eax, dword [esp + 0x2c]
sub eax, dword [0xd3c044]
jne 0x58b18d
add esp, 0x3c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.00401690
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
sub esp, 0x1c
mov edx, dword [0xd3c044]
mov dword [esp + 0xc], edx
xor edx, edx
mov eax, dword [esp + 0x20]
test eax, eax
je 0x58b1d8
mov eax, dword [eax + 0x48]
test eax, eax
je 0x58b1d8
mov edx, dword [eax + 0x44]
mov eax, dword [eax + 0x40]
mov ecx, dword [esp + 0xc]
sub ecx, dword [0xd3c044]
jne 0x58b1de
add esp, 0x1c
ret
xor eax, eax
xor edx, edx
jmp 0x58b1c4
call fcn.00401690
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
sub esp, 0x1c
mov edx, dword [0xd3c044]
mov dword [esp + 0xc], edx
xor edx, edx
mov eax, dword [esp + 0x20]
test eax, eax
je 0x58b220
mov edx, dword [eax + 4]
mov eax, dword [eax]
mov ecx, dword [esp + 0xc]
sub ecx, dword [0xd3c044]
jne 0x58b226
add esp, 0x1c
ret
xor eax, eax
xor edx, edx
jmp 0x58b20c
call fcn.00401690
nop
nop
nop
nop
nop
sub esp, 0x1c
mov edx, dword [0xd3c044]
mov dword [esp + 0xc], edx
xor edx, edx
mov eax, dword [esp + 0x20]
test eax, eax
je 0x58b268
mov eax, dword [eax + 0x48]
test eax, eax
je 0x58b268
mov eax, dword [eax + 4]
mov edx, dword [esp + 0xc]
sub edx, dword [0xd3c044]
jne 0x58b26c
add esp, 0x1c
ret
xor eax, eax
jmp 0x58b251
call fcn.00401690
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
sub esp, 0x1c
mov edx, dword [0xd3c044]
mov dword [esp + 0xc], edx
xor edx, edx
mov eax, dword [esp + 0x20]
test eax, eax
je 0x58b2b8
mov eax, dword [eax + 0x48]
test eax, eax
je 0x58b2a1
mov eax, dword [eax + 0x3c]
mov edx, dword [esp + 0xc]
sub edx, dword [0xd3c044]
jne 0x58b2bc
add esp, 0x1c
ret
xor eax, eax
jmp 0x58b2a1
call fcn.00401690
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
sub esp, 0x1c
mov edx, dword [0xd3c044]
mov dword [esp + 0xc], edx
xor edx, edx
mov eax, dword [esp + 0x20]
mov edx, str.unknown_error
cmp eax, 0x20
ja 0x58b2f4
mov edx, dword [eax*4 + 0xd386c0]
mov eax, dword [esp + 0xc]
sub eax, dword [0xd3c044]
jne 0x58b306
mov eax, edx
add esp, 0x1c
ret
call fcn.00401690
nop
nop
nop
nop
nop