Function at 0x436e68
Capabilities:
Clear file content
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff004
push eax
add esp, 0xffffffe0
push ebx
push esi
push edi
mov edi, dword [ebp + 0x20]
mov ebx, dword [ebp + 0xc]
test edi, 0x10000000
mov esi, dword [ebp + 8]
je 0x436e8e
call fcn.0040330c
test edi, 0x20
je 0x436eb1
mov al, byte [ebx + 0x2c]
test al, al
jne 0x436eb1
mov dl, byte [ebx + 0x130]
test dl, dl
jne 0x436eb1
mov eax, 1
jmp 0x4372e4
test edi, 0x200
jne 0x436ed1
lea edx, [ebx + 0x2c]
push edx
call fcn.00436d60
pop ecx
test al, al
je 0x436ed1
mov eax, 1
jmp 0x4372e4
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebx + 0x20]
add dword [edx], ecx
test byte [ebx], 0x10
je 0x436ee5
mov eax, dword [ebp + 0x1c]
inc dword [eax]
jmp 0x436eea
mov edx, dword [ebp + 0x18]
inc dword [edx]
test edi, 0x8000
je 0x436f01
test byte [ebx], 0x10
jne 0x436f01
mov eax, 1
jmp 0x4372e4
mov eax, dword [ebx]
test al, 0x10
je 0x436f36
test edi, 0x100
je 0x436f36
test ah, 4
je 0x436f26
push 5
push 0x5d0fe4
push esi
call fcn.004042b4
add esp, 0xc
jmp 0x436f36
push 5
push 0x5d0fea
push esi
call fcn.004042b4
add esp, 0xc
test edi, 0x20
je 0x4370a0
test byte [ebx], 4
je 0x436f59
push 1
push 0x5d0ff0
push esi
call fcn.004042b4
add esp, 0xc
jmp 0x436f69
push 1
push 0x5d0ff2
push esi
call fcn.004042b4
add esp, 0xc
test byte [ebx], 2
je 0x436f80
push 1
push 0x5d0ff4
push esi
call fcn.004042b4
add esp, 0xc
jmp 0x436f90
push 1
push 0x5d0ff6
push esi
call fcn.004042b4
add esp, 0xc
test byte [ebx], 1
je 0x436fa7
push 1
push 0x5d0ff8
push esi
call fcn.004042b4
add esp, 0xc
jmp 0x436fb7
push 1
push 0x5d0ffa
push esi
call fcn.004042b4
add esp, 0xc
test byte [ebx], 0x20
je 0x436fce
push 1
push 0x5d0ffc
push esi
call fcn.004042b4
add esp, 0xc
jmp 0x436fde
push 1
push 0x5d0ffe
push esi
call fcn.004042b4
add esp, 0xc
test byte [ebx + 1], 4
je 0x436ff6
push 1
push 0x5d1000
push esi
call fcn.004042b4
add esp, 0xc
jmp 0x43701d
test byte [ebx], 0x10
je 0x43700d
push 1
push 0x5d1002
push esi
call fcn.004042b4
add esp, 0xc
jmp 0x43701d
push 1
push 0x5d1004
push esi
call fcn.004042b4
add esp, 0xc
lea edx, [ebp - 0xc]
push edx
lea ecx, [ebx + 0x14]
push ecx
call sub.KERNEL32.dll_FileTimeToLocalFileTime
lea eax, [ebp - 0x1020]
push eax
lea edx, [ebp - 0xc]
push edx
call sub.KERNEL32.dll_FileTimeToSystemTime
movzx ecx, word [ebp - 0x1020]
push ecx
movzx eax, word [ebp - 0x101e]
push eax
movzx edx, word [ebp - 0x101a]
push edx
movzx ecx, word [ebp - 0x1014]
push ecx
movzx eax, word [ebp - 0x1016]
push eax
lea eax, [ebp - 0x1010]
movzx edx, word [ebp - 0x1018]
push edx
mov ecx, dword [ebx + 0x20]
push ecx
push 0x5d1006
push eax
call fcn.004d26c8
add esp, 0x24
lea edx, [ebp - 0x1010]
push edx
call fcn.004cdfec
pop ecx
push eax
lea ecx, [ebp - 0x1010]
push ecx
push esi
call fcn.004042b4
add esp, 0xc
test edi, 0x40
je 0x4370e0
mov eax, dword [ebp + 0x10]
push esi
push edi
mov edi, eax
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea esi, [ebp - 0x1010]
xchg edi, esi
mov edx, ecx
mov eax, edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
mov eax, dword [ebp + 0x10]
push eax
call fcn.004cdfec
pop ecx
jmp 0x4370e9
mov byte [ebp - 0x1010], 0
xor eax, eax
push edi
push eax
push ebx
call fcn.00436cd8
add esp, 0xc
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
test edx, edx
je 0x437126
test edi, 0x40
je 0x437113
lea ecx, [ebp - 0x1010]
push ecx
call fcn.00436d94
pop ecx
mov eax, dword [ebp - 4]
push eax
lea edx, [ebp - 0x1010]
push edx
call fcn.004cdf10
add esp, 8
test edi, 0x200000
je 0x43713f
push 0
lea ecx, [ebp - 0x1010]
push ecx
call fcn.00436bac
add esp, 8
lea eax, [ebp - 0x1010]
push eax
call fcn.004cdfec
pop ecx
push eax
lea edx, [ebp - 0x1010]
push edx
push esi
call fcn.004042b4
add esp, 0xc
push esi
call fcn.00404388
test edi, 0x400000
pop ecx
je 0x4372df
push 0x5d102d
lea esi, [ebx + 0x2c]
push esi
call fcn.004ce170
add esp, 8
test eax, eax
jne 0x4372df
mov eax, edi
and eax, 0x10000000
test eax, eax
je 0x4371d6
push esi
push 0x5d1037
lea edx, [ebp - 0x1010]
push edx
call fcn.004d26c8
add esp, 0xc
and edi, 0x10000000
test edi, edi
je 0x4371d6
push 0
push 0x2006
push 0x3c
push 0xffffffffffffff9c
push 0x8c
push 0x50
push 0
lea ecx, [ebp - 0x1010]
push ecx
call fcn.0040312c
add esp, 0x20
mov eax, dword [ebp + 0x10]
push esi
mov edi, eax
xor eax, eax
or ecx, 0xffffffff
lea esi, [ebp - 0x1010]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [ebp - 0x1010]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop esi
push eax
call fcn.004cdfec
pop ecx
test eax, eax
je 0x43723f
lea edx, [ebp - 0x1010]
push edx
call fcn.004cdfec
pop ecx
movsx ecx, byte [ebp + eax - 0x1011]
cmp ecx, 0x5c
je 0x43723f
push 0x5d103f
lea eax, [ebp - 0x1010]
push eax
call fcn.004cdf10
add esp, 8
push esi
lea edx, [ebp - 0x1010]
push edx
call fcn.004cdf10
add esp, 8
lea ecx, [ebp - 0x1010]
push 0
push 0x80
push 3
push 0
push 3
push 0x40000000
push ecx
call sub.KERNEL32.dll_CreateFileA
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4372df
push 0x1000
push 0
lea eax, [ebp - 0x1010]
push eax
call fcn.004cde6c
add esp, 0xc
push 0
push ebx
call sub.KERNEL32.dll_GetFileSize
mov edi, eax
xor esi, esi
test edi, edi
je 0x4372d9
push ebx
call fcn.00404038
pop ecx
lea eax, [ebp - 0x10]
push 0
push eax
lea edx, [ebp - 0x1010]
push 0x1000
push edx
push ebx
call sub.KERNEL32.dll_WriteFile
test eax, eax
je 0x4372c4
add esi, dword [ebp - 0x10]
cmp edi, esi
ja 0x4372a1
cmp edi, 0x100000
jbe 0x4372d9
push ebx
call fcn.00404038
pop ecx
push ebx
call sub.KERNEL32.dll_SetEndOfFile
push ebx
call sub.KERNEL32.dll_CloseHandle
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret