Function at 0x56d8bc
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, ecx
mov eax, dword [esi + 4]
push edi
cmp eax, 2
je 0x56d8d8
cmp eax, 3
jne 0x56db8b
xor ebx, ebx
cmp dword [ebp + 8], ebx
je 0x56db8b
cmp dword [ebp + 0x10], ebx
je 0x56db8b
cmp dword [esi + 0xc], 0xffffffff
jne 0x56d914
mov ecx, dword [esi + 0x4c]
mov edx, dword [esi]
mov edi, dword [esi + 0x48]
mov dword [ebp - 0xc], ecx
push eax
mov ecx, esi
call dword [edx + 0x34]
cmp eax, ebx
jne 0x56db8e
mov eax, dword [ebp - 0xc]
mov dword [esi + 0x48], edi
mov dword [esi + 0x4c], eax
cmp dword [esi + 0x18], ebx
jne 0x56d93a
mov ecx, 0x6bae74
call fcn.0056e187
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], ebx
cmp eax, ebx
jne 0x56d93a
or dword [esi + 8], 0xffffffff
mov edi, dword [esi + 0x38]
xor eax, eax
push eax
push edi
push dword [esi + 0x4c]
push dword [esi + 0x48]
call fcn.0054cfd0
xor ecx, ecx
push ecx
push edi
push edx
push eax
call fcn.0054cf90
push ebx
push edx
push eax
push dword [esi + 0xc]
mov ecx, esi
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edx
call fcn.0056cfcf
cmp eax, dword [ebp - 0x10]
jne 0x56d974
cmp edx, dword [ebp - 0xc]
je 0x56d9a3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x14]
mov dword [esi + 8], eax
cmp ecx, ebx
je 0x56d997
push dword [esi + 0x10]
push eax
push 0x277
mov edx, dword [ecx]
push str.CPortableUnBufWinPFile.cpp
call dword [edx + 4]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x10]
jmp 0x56db8e
cmp dword [ebp + 0xc], ebx
jbe 0x56db0f
mov edi, dword [esi + 0x38]
push ebx
push edi
push dword [esi + 0x4c]
push dword [esi + 0x48]
call fcn.00553290
cmp edx, ebx
jl 0x56db0f
jg 0x56d9ce
cmp eax, ebx
jbe 0x56db0f
mov eax, dword [esi + 0x48]
xor edx, edx
div edi
push ebx
lea eax, [ebp - 8]
push eax
push edi
push dword [esi + 0x18]
mov ecx, esi
push dword [esi + 0xc]
mov dword [ebp - 8], ebx
mov dword [ebp - 4], edx
call fcn.0056d042
test eax, eax
jne 0x56da0d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x14]
mov dword [esi + 8], eax
cmp ecx, ebx
je 0x56d997
push dword [esi + 0x10]
push eax
push 0x2a0
jmp 0x56d98d
mov eax, dword [esi + 0x38]
sub eax, dword [ebp - 4]
mov edi, dword [ebp + 0xc]
cmp edi, eax
jbe 0x56da1c
mov edi, eax
mov eax, dword [esi + 0x18]
add eax, dword [ebp - 4]
push edi
push dword [ebp + 8]
push eax
call fcn.00546f90
add esp, 0xc
push ebx
push dword [ebp - 0xc]
mov ecx, esi
push dword [ebp - 0x10]
push dword [esi + 0xc]
call fcn.0056cfcf
cmp eax, dword [ebp - 0x10]
jne 0x56da4a
cmp edx, dword [ebp - 0xc]
je 0x56da6c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x14]
mov dword [esi + 8], eax
cmp ecx, ebx
je 0x56d997
push dword [esi + 0x10]
push eax
push 0x2b5
jmp 0x56d98d
push ebx
lea eax, [ebp - 8]
push eax
push dword [esi + 0x38]
push dword [esi + 0x18]
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x56dae6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x14]
mov dword [esi + 8], eax
cmp ecx, ebx
je 0x56d997
push dword [esi + 0x10]
push eax
push 0x2c2
jmp 0x56d98d
mov ecx, dword [esi + 0x38]
mov eax, dword [ebp + 0xc]
xor edx, edx
div ecx
mov edi, eax
mov eax, dword [esi + 0x3c]
imul edi, ecx
cmp edi, eax
jbe 0x56dabe
mov edi, eax
push edi
push dword [ebp + 8]
push dword [esi + 0x18]
call fcn.00546f90
add esp, 0xc
push ebx
lea eax, [ebp - 4]
push eax
push edi
push dword [esi + 0x18]
mov dword [ebp - 4], ebx
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x56db5f
mov eax, dword [ebp + 0x10]
add dword [eax], edi
sub dword [ebp + 0xc], edi
add dword [ebp + 8], edi
add dword [esi + 0x48], edi
mov ecx, dword [esi + 0x48]
adc dword [esi + 0x4c], ebx
mov eax, dword [esi + 0x4c]
cmp eax, dword [esi + 0x34]
jl 0x56db0f
jg 0x56db09
cmp ecx, dword [esi + 0x30]
jbe 0x56db0f
mov dword [esi + 0x30], ecx
mov dword [esi + 0x34], eax
mov eax, dword [ebp + 0xc]
cmp eax, dword [esi + 0x38]
jae 0x56daa6
mov edi, eax
cmp edi, ebx
jbe 0x56dc4f
push ebx
lea eax, [ebp + 0xc]
push eax
push dword [esi + 0x38]
mov ecx, esi
push dword [esi + 0x18]
mov dword [ebp + 0xc], ebx
push dword [esi + 0xc]
call fcn.0056d042
test eax, eax
jne 0x56db95
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x14]
mov dword [esi + 8], eax
cmp ecx, ebx
je 0x56d997
push dword [esi + 0x10]
push eax
push 0x311
jmp 0x56d98d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x14]
mov dword [esi + 8], eax
cmp ecx, ebx
je 0x56db82
push dword [esi + 0x10]
push eax
push 0x2eb
mov edx, dword [ecx]
push str.CPortableUnBufWinPFile.cpp
call dword [edx + 4]
cmp dword [esi + 8], ebx
jne 0x56d997
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret 0xc
push edi
push dword [ebp + 8]
push dword [esi + 0x18]
call fcn.00546f90
add esp, 0xc
push ebx
push dword [esi + 0x4c]
mov ecx, esi
push dword [esi + 0x48]
push dword [esi + 0xc]
call fcn.0056cfcf
cmp eax, dword [esi + 0x48]
jne 0x56dbbf
cmp edx, dword [esi + 0x4c]
je 0x56dbe1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x14]
mov dword [esi + 8], eax
cmp ecx, ebx
je 0x56d997
push dword [esi + 0x10]
push eax
push 0x323
jmp 0x56d98d
push ebx
lea eax, [ebp + 0xc]
push eax
push dword [esi + 0x38]
push dword [esi + 0x18]
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x56dc1b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x14]
mov dword [esi + 8], eax
cmp ecx, ebx
je 0x56db82
push dword [esi + 0x10]
push eax
push 0x32f
jmp 0x56db78
mov eax, dword [ebp + 0x10]
add dword [eax], edi
add dword [esi + 0x48], edi
mov ecx, dword [esi + 0x48]
adc dword [esi + 0x4c], ebx
mov eax, dword [esi + 0x4c]
cmp eax, dword [esi + 0x34]
jl 0x56dc3e
jg 0x56dc38
cmp ecx, dword [esi + 0x30]
jbe 0x56dc3e
mov dword [esi + 0x30], ecx
mov dword [esi + 0x34], eax
mov eax, dword [esi]
lea ecx, [ebp - 0x10]
push ecx
mov ecx, esi
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
call dword [eax + 0x24]
xor eax, eax
jmp 0x56db8e