Function at 0x469100
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov dword [ebp - 0xc], esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], ebx
mov dword [ebp - 8], edi
mov eax, dword [esi + 0x40]
neg eax
mov ebx, dword [esi + 0x3c]
add eax, ebx
mov ecx, dword [esi + 0xf8]
cmp eax, ecx
jae 0x469164
sub ecx, eax
test byte [esi + 0x172], 0x40
je 0x46913c
push ecx
push 0x20
push ebx
call fcn.004a2ae0
jmp 0x469145
push ecx
push 0
push ebx
call fcn.004a2ae0
add esp, 0xc
mov eax, dword [esi + 0xf8]
movzx ecx, byte [esi + 0x170]
cmp byte [esi + 0x15e], 2
je 0x46922b
jmp 0x46916b
movzx ecx, byte [esi + 0x170]
test cl, 4
je 0x469189
test byte [esi + 0x172], 0x40
je 0x469189
mov ecx, dword [esi + 0x40]
mov byte [ecx + eax - 2], 0xd
mov ebx, dword [esi + 0x40]
mov byte [ebx + eax - 1], 0xa
mov ecx, dword [esi + 0x98]
add ecx, 0xffffffff
mov ebx, dword [esi + 0x9c]
adc ebx, 0xffffffff
push ebx
cdq
push ecx
push edx
push eax
call fcn.0048f310
test byte [esi + 0x175], 4
jne 0x4691e7
push 0
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x14]
push ecx
push eax
mov dword [ebp - 0x14], edx
push dword [esi + 0xe4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x18], eax
cmp eax, 0xffffffff
je 0x46937a
mov ebx, dword [ebp - 0x14]
mov ecx, 0xffffffff
sub eax, ecx
sub ebx, ecx
or eax, ebx
je 0x46935f
mov edx, dword [esi + 0xf8]
mov edi, dword [esi + 0x40]
add edi, edx
mov eax, dword [esi + 0x38]
mov dword [esi + 0x40], edi
test byte [esi + 0x179], 0x40
je 0x469248
mov ebx, dword [esi + 0x44]
mov ecx, ebx
sub ecx, eax
cmp ecx, dword [esi + 0xec]
je 0x469248
add edx, ebx
mov dword [esi + 0x44], edx
or byte [esi + 0x175], 4
xor eax, eax
mov ebx, dword [ebp - 4]
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
test cl, 4
jne 0x46916b
mov ecx, dword [esi + 0x40]
mov byte [eax + ecx - 1], 0xa
movzx ecx, byte [esi + 0x170]
jmp 0x46916b
mov edx, dword [esi + 0x140]
test edx, edx
jne 0x469257
mov edx, 0x20000
sub edi, eax
cmp edi, edx
ja 0x469281
push 0
lea ecx, [ebp - 0x10]
push ecx
push edi
push eax
push dword [esi + 0xe4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, 0xffffffff
test eax, eax
je 0x4692e9
mov ecx, 1
jmp 0x4692e9
mov dword [ebp - 0x1c], edi
mov ebx, edi
mov edi, eax
mov eax, edx
mov edx, esi
mov esi, eax
push 0
lea ecx, [ebp - 0x10]
push ecx
push esi
push edi
push dword [edx + 0xe4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp + 8]
test eax, eax
jne 0x4692b5
mov edi, dword [ebp - 0x1c]
mov esi, edx
mov ecx, 0xffffffff
jmp 0x4692e9
mov ecx, dword [edx + 0x140]
test ecx, ecx
mov eax, dword [ebp - 0x10]
jne 0x4692c7
mov ecx, 0x20000
sub ebx, eax
add edi, eax
cmp ebx, ecx
jae 0x4692d7
mov esi, ebx
test ebx, ebx
jne 0x4692db
jmp 0x4692df
test ebx, ebx
je 0x4692df
test eax, eax
ja 0x46928e
mov edi, dword [ebp - 0x1c]
mov esi, edx
mov ecx, 1
mov eax, dword [esi + 0x38]
mov ebx, dword [esi + 0xf8]
mov dword [esi + 0x40], eax
add eax, ebx
mov dword [esi + 0x44], eax
mov eax, edi
cdq
mov eax, dword [esi + 0xc0]
add edi, eax
adc edx, dword [esi + 0xc4]
xor ebx, ebx
and byte [esi + 0x175], 0xfb
mov dword [esi + 0xa8], ebx
cmp ecx, 0xffffffff
mov dword [esi + 0xac], ebx
mov dword [esi + 0xc0], edi
mov dword [esi + 0xc4], edx
mov dword [esi + 0xb8], edi
mov dword [esi + 0xbc], edx
jne 0x46921c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xe8], eax
mov eax, 0x26
mov ebx, dword [ebp - 4]
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xe8], eax
mov eax, 0x26
mov ebx, dword [ebp - 4]
mov esi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x469391
mov eax, 0xffffffff
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
jmp 0x46935f
mov eax, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x14]
jmp 0x4691d6