Function at 0x437464
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 4
add esp, 0xfffff004
push eax
dec eax
jne 0x43746d
mov eax, dword [ebp - 4]
add esp, 0xfffffdc8
push ebx
push esi
push edi
mov esi, dword [ebp + 0x18]
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
cmp esi, 3
je 0x4374a5
cmp esi, 2
je 0x4374a5
cmp esi, 1
je 0x4374a5
mov eax, 0x10000
jmp 0x4377a6
cmp esi, 3
jne 0x43754f
mov eax, dword [ebx + 4]
cmp edi, eax
je 0x437507
inc eax
je 0x4374c1
mov edx, dword [ebx]
push edx
call fcn.00436d04
pop ecx
mov dword [ebx + 4], 0xffffffff
mov eax, dword [ebx]
mov edx, dword [eax + 4]
cmp edi, edx
jl 0x4374db
mov eax, 0x10000
jmp 0x4377a6
mov edx, dword [eax + 0x10]
cmp edi, edx
jge 0x4374f2
push eax
call fcn.0043657c
pop ecx
jmp 0x4374f2
push eax
call fcn.004365c8
pop ecx
mov eax, dword [ebx]
mov edx, dword [eax + 0x10]
cmp edi, edx
jg 0x4374eb
mov ecx, dword [ebx]
push ecx
call fcn.00436918
pop ecx
mov dword [ebx + 4], edi
mov eax, dword [ebp + 0x14]
push eax
mov edx, dword [ebp + 0x10]
push edx
mov ecx, dword [ebx]
push ecx
call fcn.00436a54
add esp, 0xc
mov esi, eax
test esi, esi
jle 0x43752a
mov eax, 0x600
jmp 0x4377a6
mov edx, dword [ebx]
push edx
call fcn.00436d04
pop ecx
mov dword [ebx + 4], 0xffffffff
test esi, esi
jne 0x437545
xor eax, eax
jmp 0x4377a6
mov eax, 0x5000000
jmp 0x4377a6
mov edx, dword [ebx + 4]
inc edx
je 0x43755e
mov ecx, dword [ebx]
push ecx
call fcn.00436d04
pop ecx
mov dword [ebx + 4], 0xffffffff
mov eax, dword [ebx]
mov edx, dword [eax + 4]
cmp edi, edx
jl 0x437578
mov eax, 0x10000
jmp 0x4377a6
mov edx, dword [eax + 0x10]
cmp edi, edx
jge 0x43758f
push eax
call fcn.0043657c
pop ecx
jmp 0x43758f
push eax
call fcn.004365c8
pop ecx
mov eax, dword [ebx]
mov edx, dword [eax + 0x10]
cmp edi, edx
jg 0x437588
lea ecx, [ebp - 0x138]
push ecx
push edi
push ebx
call fcn.00436f04
add esp, 0xc
test byte [ebp - 0x30], 0x10
je 0x4375d8
cmp esi, 1
jne 0x4375bb
xor eax, eax
jmp 0x4377a6
lea edx, [ebp - 0x134]
push edx
add ebx, 0x138
push ebx
call fcn.004373a4
add esp, 8
xor eax, eax
jmp 0x4377a6
cmp esi, 1
jne 0x4375e5
mov edi, dword [ebp + 0x10]
jmp 0x4376ee
mov edi, dword [ebp + 0x10]
mov eax, edi
jmp 0x4375fd
movsx edx, byte [eax]
cmp edx, 0x2f
je 0x4375f9
cmp edx, 0x5c
jne 0x4375fc
lea edi, [eax + 1]
inc eax
mov dl, byte [eax]
test dl, dl
jne 0x4375ec
mov eax, dword [ebp + 0x10]
cmp edi, eax
je 0x4376d2
mov ecx, dword [ebp + 0x10]
push esi
push edi
mov edi, ecx
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea esi, [ebp - 0x23c]
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
mov eax, dword [ebp + 0x10]
sub edi, eax
pop esi
mov byte [ebp + edi - 0x23d], 0
movsx eax, byte [ebp - 0x23c]
cmp eax, 0x2f
je 0x437668
cmp eax, 0x5c
je 0x437668
movsx edx, byte [ebp - 0x23b]
cmp edx, 0x3a
je 0x437668
xor ecx, ecx
jmp 0x43766d
mov ecx, 1
mov byte [ebp - 1], cl
push 0x5ea095
lea eax, [ebp - 0x23c]
push eax
call fcn.004d302d
add esp, 8
test eax, eax
setne dl
and edx, 1
lea eax, [ebp - 0x23c]
push 0x5ea099
push eax
mov edi, edx
call fcn.004d302d
add esp, 8
test eax, eax
setne dl
and edx, 1
or edi, edx
setne cl
and ecx, 1
or byte [ebp - 1], cl
mov al, byte [ebp - 1]
test al, al
jne 0x4376d2
lea edx, [ebp - 0x23c]
push edx
lea ecx, [ebx + 0x138]
push ecx
call fcn.004373a4
add esp, 8
push 0
mov eax, dword [ebp - 0x30]
push eax
push 2
push 0
push 0
push 0x40000000
mov edx, dword [ebp + 0x10]
push edx
call sub.KERNEL32.dll_CreateFileA
mov edi, eax
cmp edi, 0xffffffff
jne 0x4376fd
mov eax, 0x200
jmp 0x4377a6
mov edx, dword [ebx]
push edx
call fcn.00436918
pop ecx
mov byte [ebp - 2], 0
push 0x4000
lea ecx, [ebp - 0x423c]
push ecx
mov eax, dword [ebx]
push eax
call fcn.00436a54
add esp, 0xc
test eax, eax
jge 0x43772b
mov byte [ebp - 2], 1
jmp 0x43774f
test eax, eax
je 0x43774f
push 0
lea edx, [ebp - 8]
push edx
push eax
lea ecx, [ebp - 0x423c]
push ecx
push edi
call sub.KERNEL32.dll_WriteFile
test eax, eax
jne 0x43770a
mov byte [ebp - 2], 1
jmp 0x43774f
mov byte [ebp - 9], 0
push edi
call sub.KERNEL32.dll_GetFileType
cmp eax, 1
jne 0x437769
mov al, byte [ebp - 2]
test al, al
jne 0x437769
mov byte [ebp - 9], 1
mov dl, byte [ebp - 9]
test dl, dl
je 0x437782
lea ecx, [ebp - 0x1c]
push ecx
lea eax, [ebp - 0x2c]
push eax
lea edx, [ebp - 0x24]
push edx
push edi
call sub.KERNEL32.dll_SetFileTime
cmp esi, 1
je 0x43778d
push edi
call sub.KERNEL32.dll_CloseHandle
mov ecx, dword [ebx]
push ecx
call fcn.00436d04
pop ecx
mov al, byte [ebp - 2]
test al, al
je 0x4377a4
mov eax, 0x400
jmp 0x4377a6
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret