Function at 0x57bf50
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov ebx, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
mov esi, dword [ebp + 0xc]
test ebx, ebx
sete al
cmp ecx, 2
sete dl
or eax, edx
test al, 1
jne 0x57c010
mov eax, dword [ebx + 0x38]
cmp eax, 0xffffffff
je 0x57c010
cmp eax, 0xfffffffd
je 0x57c010
movzx edx, byte [ebx + 0x5c]
cmp dl, 0x77
je 0x57c051
dec ecx
je 0x57c1ac
test esi, esi
mov ecx, 0xffffffff
js 0x57c015
mov edi, dword [ebx + 0x58]
test edi, edi
jne 0x57c165
mov eax, dword [ebx + 0x68]
cmp eax, esi
jg 0x57bff5
sub esi, eax
test esi, esi
je 0x57c048
mov ecx, dword [ebx + 0x48]
test ecx, ecx
je 0x57c1b6
test esi, esi
je 0x57c048
cmp dword [ebx + 0x6c], 0xffffffff
je 0x57c048
inc dword [ebx + 0x68]
dec esi
mov edi, dword [ebx + 0x70]
mov dword [ebx + 0x6c], 0xffffffff
test edi, edi
je 0x57c048
mov dword [ebx + 0x38], 1
jmp 0x57c048
test ebx, ebx
je 0x57c010
cmp dl, 0x72
je 0x57c1d7
lea esi, [esi]
lea edi, [edi]
mov ecx, 0xffffffff
add esp, 0x1c
mov eax, ecx
pop ebx
pop esi
pop edi
pop ebp
ret
cmp esi, 0x3fff
mov eax, 0x4000
jg 0x57c02f
mov eax, esi
mov dword [esp + 8], eax
mov edx, dword [ebx + 0x48]
mov dword [esp], ebx
mov dword [esp + 4], edx
call fcn.0057b0f0
test eax, eax
jle 0x57c010
sub esi, eax
test esi, esi
jg 0x57c020
mov ecx, dword [ebx + 0x68]
jmp 0x57c015
test ecx, ecx
jne 0x57c05a
mov edi, dword [ebx + 0x64]
sub esi, edi
test esi, esi
mov ecx, 0xffffffff
js 0x57c015
mov ecx, dword [ebx + 0x44]
test ecx, ecx
je 0x57c250
test esi, esi
jle 0x57c0b2
lea esi, [esi]
lea edi, [edi]
cmp esi, 0x3fff
mov edi, 0x4000
jg 0x57c08f
mov edi, esi
mov eax, dword [ebx + 0x44]
test ebx, ebx
mov dword [ebp - 0x10], eax
je 0x57c09f
cmp byte [ebx + 0x5c], 0x77
je 0x57c0c0
mov eax, 0xfffffffe
test eax, eax
je 0x57c010
sub esi, eax
test esi, esi
jg 0x57c080
mov ecx, dword [ebx + 0x64]
jmp 0x57c015
mov dword [ebx + 4], edi
mov ecx, dword [ebp - 0x10]
test edi, edi
mov dword [ebx], ecx
je 0x57c140
mov edx, dword [ebx + 0x10]
nop
test edx, edx
jne 0x57c112
mov eax, dword [ebx + 0x48]
mov ecx, 0x4000
mov edx, dword [ebx + 0x40]
mov dword [ebx + 0xc], eax
mov dword [esp + 0xc], edx
mov edx, 1
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_fwrite
cmp eax, 0x4000
jne 0x57c288
mov dword [ebx + 0x10], 0x4000
mov edx, 0x4000
add dword [ebx + 0x68], edx
xor eax, eax
mov ecx, dword [ebx + 4]
add dword [ebx + 0x64], ecx
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.0057c9e0
mov dword [ebx + 0x38], eax
mov ecx, dword [ebx + 4]
mov edx, dword [ebx + 0x10]
sub dword [ebx + 0x64], ecx
sub dword [ebx + 0x68], edx
test eax, eax
jne 0x57c140
test ecx, ecx
jne 0x57c0d0
mov dword [esp + 8], edi
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
mov edx, dword [ebx + 0x4c]
mov dword [esp], edx
call fcn.0057f570
mov dword [ebx + 0x4c], eax
mov eax, edi
mov edi, dword [ebx + 4]
sub eax, edi
jmp 0x57c0a4
mov dword [ebx + 0x6c], 0xffffffff
mov ecx, dword [ebx + 0x44]
xor eax, eax
mov dword [ebx + 4], 0
mov dword [ebx], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov edx, dword [ebx + 0x40]
mov dword [esp], edx
call sub.msvcrt.dll_fseek
test eax, eax
mov ecx, 0xffffffff
js 0x57c015
mov dword [ebx + 0x68], esi
mov ecx, esi
mov eax, ecx
mov dword [ebx + 0x64], esi
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ebx + 0x68]
add esi, ecx
jmp 0x57bfa0
mov dword [esp], 0x4000
call sub.msvcrt.dll_malloc
mov dword [ebx + 0x48], eax
test eax, eax
mov ecx, 0xffffffff
jne 0x57bfd0
jmp 0x57c015
mov dword [ebx + 0x38], 0
mov ecx, dword [ebx + 0x44]
xor eax, eax
mov dword [ebx + 0x3c], 0
xor edx, edx
mov dword [ebx + 0x6c], 0xffffffff
mov dword [ebx + 4], 0
mov dword [ebx], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], 0
call fcn.0057f570
mov dword [ebx + 0x4c], eax
mov edi, dword [ebx + 0x58]
test edi, edi
je 0x57c294
mov dword [ebx + 0x64], 0
xor eax, eax
mov dword [ebx + 0x68], 0
mov dword [esp + 8], eax
mov edx, dword [ebx + 0x60]
mov dword [esp + 4], edx
mov edi, dword [ebx + 0x40]
mov dword [esp], edi
call sub.msvcrt.dll_fseek
test eax, eax
jns 0x57bfbd
jmp 0x57c010
mov dword [esp], 0x4000
call sub.msvcrt.dll_malloc
mov dword [ebx + 0x44], eax
test eax, eax
mov ecx, 0xffffffff
je 0x57c015
mov dword [esp], eax
mov edi, 0x4000
xor edx, edx
mov dword [esp + 8], edi
mov dword [esp + 4], edx
call sub.msvcrt.dll_memset
jmp 0x57c06e
mov dword [ebx + 0x38], 0xffffffff
jmp 0x57c140
mov dword [esp], ebx
call fcn.0057f990
jmp 0x57c21a