Function at 0x10036f1e
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x644
push ebx
mov ebx, dword [ebp + 0x14]
push esi
cmp ebx, 3
push edi
mov esi, ecx
je 0x10036f50
cmp ebx, 2
je 0x10036ff8
cmp ebx, 1
je 0x10036ff8
mov eax, 0x10000
jmp 0x10037279
mov eax, dword [esi + 4]
mov edi, dword [ebp + 8]
cmp edi, eax
je 0x10036f9f
cmp eax, 0xffffffff
je 0x10036f67
push dword [esi]
call fcn.100366a8
pop ecx
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x10036f46
cmp edi, dword [eax + 0x10]
jge 0x10036f7e
push eax
call fcn.10035fb1
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jge 0x10036f8d
push eax
call fcn.10035fef
jmp 0x10036f7d
push dword [esi + 0x23c]
push dword [esi]
call fcn.1003627e
pop ecx
mov dword [esi + 4], edi
pop ecx
lea eax, [ebp + 0xb]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [esi]
call fcn.100363e1
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x10036fc5
push dword [esi]
call fcn.100366a8
or dword [esi + 4], 0xffffffff
pop ecx
cmp byte [ebp + 0xb], 0
je 0x10036fd2
xor eax, eax
jmp 0x10037279
test edi, edi
jle 0x10036fe0
mov eax, 0x600
jmp 0x10037279
xor eax, eax
cmp edi, 0xffffff96
setne al
dec eax
and eax, 0xfb001000
add eax, 0x5000000
jmp 0x10037279
cmp dword [esi + 4], 0xffffffff
je 0x10037006
push dword [esi]
call fcn.100366a8
pop ecx
mov eax, dword [esi]
mov edi, dword [ebp + 8]
or dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x10036f46
cmp edi, dword [eax + 0x10]
jge 0x10037024
push eax
call fcn.10035fb1
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jge 0x10037033
push eax
call fcn.10035fef
jmp 0x10037023
lea eax, [ebp - 0x43c]
mov ecx, esi
push eax
push edi
call fcn.10036938
test byte [ebp - 0x230], 0x10
je 0x1003708b
cmp ebx, 1
je 0x10036fcb
mov ecx, dword [ebp + 0xc]
mov ax, word [ecx]
cmp ax, 0x2f
je 0x10037072
cmp ax, 0x5c
je 0x10037072
test ax, ax
je 0x10037077
cmp word [ecx + 2], 0x3a
jne 0x10037077
push ecx
push 0
jmp 0x1003707f
add esi, 0x244
push ecx
push esi
call fcn.10036e2e
pop ecx
pop ecx
jmp 0x10036fcb
cmp ebx, 1
jne 0x10037098
mov eax, dword [ebp + 0xc]
jmp 0x1003712f
mov edi, dword [ebp + 0xc]
mov ebx, edi
mov ecx, edi
mov ax, word [edi]
test ax, ax
je 0x100370bd
cmp ax, 0x2f
je 0x100370b3
cmp ax, 0x5c
jne 0x100370b6
lea ebx, [ecx + 2]
inc ecx
inc ecx
mov ax, word [ecx]
jmp 0x100370a2
push 0x103
lea eax, [ebp - 0x20c]
push edi
push eax
call dword [sym.imp.MSVCRT.dll_wcsncpy]
add esp, 0xc
cmp ebx, edi
jne 0x10037141
and word [ebp - 0x20c], 0
lea eax, [ebp - 0x20c]
lea edi, [esi + 0x244]
push ebx
push eax
push edi
lea eax, [ebp - 0x644]
push str._s_s_s
push eax
call dword [sym.imp.MSVCRT.dll_swprintf]
lea eax, [ebp - 0x20c]
push eax
push edi
call fcn.10036e2e
add esp, 0x1c
xor eax, eax
push eax
push dword [ebp - 0x230]
push 2
push eax
push eax
lea eax, [ebp - 0x644]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
jne 0x100371b0
mov eax, 0x200
jmp 0x10037279
mov eax, ebx
sub eax, edi
sar eax, 1
and word [ebp + eax*2 - 0x20c], 0
cmp word [ebp - 0x20c], 0x2f
je 0x10037180
cmp word [ebp - 0x20c], 0x5c
je 0x10037180
cmp word [ebp - 0x20c], 0
je 0x100370df
cmp word [ebp - 0x20a], 0x3a
jne 0x100370df
lea eax, [ebp - 0x20c]
push ebx
push eax
lea eax, [ebp - 0x644]
push str._s_s
push eax
call dword [sym.imp.MSVCRT.dll_swprintf]
lea eax, [ebp - 0x20c]
push eax
push 0
call fcn.10036e2e
add esp, 0x18
jmp 0x10037110
push dword [esi + 0x23c]
push dword [esi]
call fcn.1003627e
cmp dword [esi + 0x240], 0
pop ecx
pop ecx
mov ebx, 0x4000
jne 0x100371da
push ebx
call sub.MFC42u.DLL_operatornew
pop ecx
mov dword [esi + 0x240], eax
and dword [ebp + 0x10], 0
lea eax, [ebp + 0xf]
push eax
push ebx
push dword [esi + 0x240]
push dword [esi]
call fcn.100363e1
mov edi, eax
add esp, 0x10
cmp edi, 0xffffff96
je 0x10037226
test edi, edi
jl 0x1003722f
jle 0x1003721a
lea eax, [ebp - 4]
push 0
push eax
push edi
push dword [esi + 0x240]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10037238
cmp byte [ebp + 0xf], 0
jne 0x10037241
test edi, edi
je 0x1003722f
jmp 0x100371de
mov dword [ebp + 0x10], 0x1000
jmp 0x1003725f
mov dword [ebp + 0x10], 0x5000000
jmp 0x1003725f
mov dword [ebp + 0x10], 0x400
jmp 0x1003725f
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x224]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x1003726e
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi]
call fcn.100366a8
mov eax, dword [ebp + 0x10]
pop ecx
pop edi
pop esi
pop ebx
leave
ret 0x10