Function at 0x422ecb
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x654
mov eax, dword [0x649ffc]
xor eax, esp
mov dword [esp + 0x650], eax
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov esi, ecx
mov dword [esp + 0x10], esi
push edi
mov edi, dword [ebp + 0xc]
cmp eax, 3
je 0x422f10
cmp eax, 2
je 0x422f07
cmp eax, 1
jne 0x422fd8
cmp eax, 3
jne 0x422fbd
mov ebx, dword [ebp + 8]
cmp ebx, dword [esi + 4]
je 0x422f5c
cmp dword [esi + 4], 0xffffffff
je 0x422f25
mov ecx, dword [esi]
call fcn.0042265a
mov ecx, dword [esi]
or dword [esi + 4], 0xffffffff
cmp ebx, dword [ecx + 4]
jge 0x422fd8
cmp dword [ecx + 0x10], ebx
jle 0x422f4c
call fcn.0042200f
jmp 0x422f47
mov ecx, dword [esi]
call fcn.00422046
mov ecx, dword [esi]
cmp dword [ecx + 0x10], ebx
jl 0x422f40
mov edx, dword [esi + 0x23c]
call fcn.004222d3
mov dword [esi + 4], ebx
mov ecx, dword [esi]
lea eax, [esp + 0xf]
push eax
push dword [ebp + 0x10]
mov edx, edi
call fcn.00422427
mov edi, eax
pop ecx
pop ecx
test edi, edi
jg 0x422f80
mov ecx, dword [esi]
call fcn.0042265a
or dword [esi + 4], 0xffffffff
cmp byte [esp + 0xf], 0
jne 0x423018
test edi, edi
jle 0x422fab
mov eax, 0x600
mov ecx, dword [esp + 0x65c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0056e987
mov esp, ebp
pop ebp
ret 0x10
cmp edi, 0xffffff96
mov eax, 0x5000000
mov ecx, 0x1000
cmove eax, ecx
jmp 0x422f94
cmp dword [esi + 4], 0xffffffff
je 0x422fca
mov ecx, dword [esi]
call fcn.0042265a
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
mov ebx, dword [ebp + 8]
cmp ebx, dword [eax + 4]
jl 0x422fdf
mov eax, 0x10000
jmp 0x422f94
cmp dword [eax + 0x10], ebx
jle 0x422ff9
mov ecx, eax
call fcn.0042200f
jmp 0x422ff4
mov ecx, dword [esi]
call fcn.00422046
mov eax, dword [esi]
cmp dword [eax + 0x10], ebx
jl 0x422fed
lea eax, [esp + 0x18]
mov ecx, esi
push eax
push ebx
call fcn.0042284b
test byte [esp + 0x224], 0x10
je 0x42304b
cmp dword [ebp + 0x14], 1
jne 0x42301f
xor eax, eax
jmp 0x422f94
movzx eax, word [edi]
cmp eax, 0x2f
je 0x423040
cmp eax, 0x5c
je 0x423040
test ax, ax
je 0x423038
cmp word [edi + 2], 0x3a
je 0x423040
lea ecx, [esi + 0x244]
jmp 0x423042
xor ecx, ecx
mov edx, edi
call fcn.00422dd1
jmp 0x423018
xor ebx, ebx
cmp dword [ebp + 0x14], 1
je 0x423171
movzx eax, word [edi]
mov ecx, edi
mov dword [esp + 0x10], edi
test ax, ax
je 0x423091
push 0x5c
pop ebx
push 0x2f
mov edx, eax
pop esi
cmp dx, si
je 0x423077
cmp dx, bx
jne 0x42307e
lea eax, [ecx + 2]
mov dword [esp + 0x10], eax
add ecx, 2
movzx eax, word [ecx]
mov edx, eax
test ax, ax
jne 0x42306d
mov esi, dword [esp + 0x14]
xor ebx, ebx
lea eax, [esp + 0x248]
push edi
push eax
call fcn.00597ac3
pop ecx
pop ecx
mov ecx, dword [esp + 0x10]
cmp ecx, edi
jne 0x4230b5
xor eax, eax
mov word [esp + 0x248], ax
jmp 0x4230f9
mov eax, ecx
sub eax, edi
and eax, 0xfffffffe
cmp eax, 0x208
jae 0x423244
xor edx, edx
mov word [esp + eax + 0x248], dx
mov ax, word [esp + 0x248]
push 0x2f
pop edx
cmp ax, dx
je 0x423121
push 0x5c
pop edx
cmp ax, dx
je 0x423121
test ax, ax
je 0x4230f9
cmp word [esp + 0x24a], 0x3a
je 0x423121
push ecx
lea eax, [esp + 0x24c]
push eax
lea edi, [esi + 0x244]
push edi
lea eax, [esp + 0x45c]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
jmp 0x423142
push ecx
lea eax, [esp + 0x24c]
push eax
lea eax, [esp + 0x458]
push 0x5fc740
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
mov edi, ebx
lea edx, [esp + 0x248]
mov ecx, edi
call fcn.00422dd1
push ebx
push dword [esp + 0x228]
lea eax, [esp + 0x458]
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x423180
mov eax, 0x200
jmp 0x422f94
mov edx, dword [esi + 0x23c]
mov ecx, dword [esi]
call fcn.004222d3
cmp dword [esi + 0x240], ebx
jne 0x4231a6
push 0x4000
call fcn.0056f127
pop ecx
mov dword [esi + 0x240], eax
mov edx, dword [esi + 0x240]
lea eax, [esp + 0xf]
mov ecx, dword [esi]
push eax
push 0x4000
call fcn.00422427
mov dword [esp + 0x1c], eax
pop ecx
pop ecx
cmp eax, 0xffffff96
je 0x423224
test eax, eax
js 0x4231f5
jle 0x4231ea
push ebx
lea ecx, [esp + 0x14]
push ecx
push eax
push dword [esi + 0x240]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4231fc
mov eax, dword [esp + 0x14]
cmp byte [esp + 0xf], 0
jne 0x423203
test eax, eax
jne 0x4231a6
mov ebx, 0x5000000
jmp 0x423229
mov ebx, 0x400
jmp 0x423229
lea eax, [esp + 0x238]
push eax
lea eax, [esp + 0x22c]
push eax
lea eax, [esp + 0x238]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x423229
mov ebx, 0x1000
cmp dword [ebp + 0x14], 1
je 0x423236
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi]
call fcn.0042265a
mov eax, ebx
jmp 0x422f94
call fcn.0056eaf7
int3