Function at 0x57d190
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 0x57d250
mov eax, dword [ebx + 0x38]
cmp eax, 0xffffffff
je 0x57d250
cmp eax, 0xfffffffd
je 0x57d250
movzx edx, byte [ebx + 0x5c]
cmp dl, 0x77
je 0x57d291
dec ecx
je 0x57d3ec
test esi, esi
mov ecx, 0xffffffff
js 0x57d255
mov edi, dword [ebx + 0x58]
test edi, edi
jne 0x57d3a5
mov eax, dword [ebx + 0x68]
cmp eax, esi
jg 0x57d235
sub esi, eax
test esi, esi
je 0x57d288
mov ecx, dword [ebx + 0x48]
test ecx, ecx
je 0x57d3f6
test esi, esi
je 0x57d288
cmp dword [ebx + 0x6c], 0xffffffff
je 0x57d288
inc dword [ebx + 0x68]
dec esi
mov edi, dword [ebx + 0x70]
mov dword [ebx + 0x6c], 0xffffffff
test edi, edi
je 0x57d288
mov dword [ebx + 0x38], 1
jmp 0x57d288
test ebx, ebx
je 0x57d250
cmp dl, 0x72
je 0x57d417
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 0x57d26f
mov eax, esi
mov dword [esp + 8], eax
mov edx, dword [ebx + 0x48]
mov dword [esp], ebx
mov dword [esp + 4], edx
call fcn.0057c330
test eax, eax
jle 0x57d250
sub esi, eax
test esi, esi
jg 0x57d260
mov ecx, dword [ebx + 0x68]
jmp 0x57d255
test ecx, ecx
jne 0x57d29a
mov edi, dword [ebx + 0x64]
sub esi, edi
test esi, esi
mov ecx, 0xffffffff
js 0x57d255
mov ecx, dword [ebx + 0x44]
test ecx, ecx
je 0x57d490
test esi, esi
jle 0x57d2f2
lea esi, [esi]
lea edi, [edi]
cmp esi, 0x3fff
mov edi, 0x4000
jg 0x57d2cf
mov edi, esi
mov eax, dword [ebx + 0x44]
test ebx, ebx
mov dword [ebp - 0x10], eax
je 0x57d2df
cmp byte [ebx + 0x5c], 0x77
je 0x57d300
mov eax, 0xfffffffe
test eax, eax
je 0x57d250
sub esi, eax
test esi, esi
jg 0x57d2c0
mov ecx, dword [ebx + 0x64]
jmp 0x57d255
mov dword [ebx + 4], edi
mov ecx, dword [ebp - 0x10]
test edi, edi
mov dword [ebx], ecx
je 0x57d380
mov edx, dword [ebx + 0x10]
nop
test edx, edx
jne 0x57d352
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 0x57d4c8
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.0057dc20
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 0x57d380
test ecx, ecx
jne 0x57d310
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.005807b0
mov dword [ebx + 0x4c], eax
mov eax, edi
mov edi, dword [ebx + 4]
sub eax, edi
jmp 0x57d2e4
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 0x57d255
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 0x57d1e0
mov dword [esp], 0x4000
call sub.msvcrt.dll_malloc
mov dword [ebx + 0x48], eax
test eax, eax
mov ecx, 0xffffffff
jne 0x57d210
jmp 0x57d255
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.005807b0
mov dword [ebx + 0x4c], eax
mov edi, dword [ebx + 0x58]
test edi, edi
je 0x57d4d4
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 0x57d1fd
jmp 0x57d250
mov dword [esp], 0x4000
call sub.msvcrt.dll_malloc
mov dword [ebx + 0x44], eax
test eax, eax
mov ecx, 0xffffffff
je 0x57d255
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 0x57d2ae
mov dword [ebx + 0x38], 0xffffffff
jmp 0x57d380
mov dword [esp], ebx
call fcn.00580bd0
jmp 0x57d45a