Function at 0x422c70
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x650
mov eax, dword [0x487bb0]
xor eax, esp
mov dword [esp + 0x64c], eax
mov eax, dword [esp + 0x654]
push esi
mov esi, dword [esp + 0x660]
test eax, eax
jne 0x422ca1
mov eax, 0x10000
jmp 0x422f80
cmp dword [eax], 1
je 0x422cb0
mov eax, 0x80000
jmp 0x422f80
push ebx
push ebp
push edi
mov edi, dword [eax + 4]
or ebp, 0xffffffff
cmp dword [edi + 4], ebp
je 0x422cc9
mov eax, dword [edi]
push eax
call fcn.00420720
add esp, 4
mov eax, dword [edi]
mov ebx, dword [esp + 0x668]
mov dword [edi + 4], ebp
cmp ebx, dword [eax + 4]
jl 0x422ce4
mov eax, 0x10000
jmp 0x422f7d
cmp ebx, dword [eax + 0x10]
jge 0x422cf2
push eax
call fcn.00420480
add esp, 4
mov ecx, dword [edi]
cmp dword [ecx + 0x10], ebx
jge 0x422d12
lea esp, [esp]
mov edx, dword [edi]
push edx
call fcn.004204d0
mov eax, dword [edi]
add esp, 4
cmp dword [eax + 0x10], ebx
jl 0x422d00
lea ecx, [esp + 0x1c]
push ecx
push ebx
mov ecx, edi
call fcn.00420890
test byte [esp + 0x228], 0x10
movzx eax, word [esi]
je 0x422d6d
cmp ax, 0x2f
je 0x422d44
cmp ax, 0x5c
je 0x422d44
test ax, ax
je 0x422d56
cmp word [esi + 2], 0x3a
jne 0x422d56
push esi
push 0
call fcn.00420df0
add esp, 8
xor eax, eax
jmp 0x422f7d
push esi
add edi, 0x244
push edi
call fcn.00420df0
add esp, 8
xor eax, eax
jmp 0x422f7d
mov ebx, esi
mov ecx, esi
test ax, ax
je 0x422d9b
movzx eax, ax
lea esp, [esp]
cmp ax, 0x2f
je 0x422d8c
cmp ax, 0x5c
jne 0x422d8f
lea ebx, [ecx + 2]
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x422d80
lea edx, [esp + 0x24c]
mov eax, esi
sub edx, esi
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x422da6
cmp ebx, esi
jne 0x422e2a
xor edx, edx
mov word [esp + 0x24c], dx
push ebx
lea edx, [esp + 0x250]
push edx
lea esi, [edi + 0x244]
push esi
lea eax, [esp + 0x460]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea ecx, [esp + 0x260]
push ecx
push esi
call fcn.00420df0
add esp, 0x1c
mov edx, dword [esp + 0x228]
push 0
push edx
push 2
push 0
push 0
push 0x40000000
lea eax, [esp + 0x46c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, ebp
jne 0x422e99
mov eax, 0x200
jmp 0x422f7d
mov eax, ebx
sub eax, esi
sar eax, 1
xor ecx, ecx
mov word [esp + eax*2 + 0x24c], cx
mov ax, word [esp + 0x24c]
cmp ax, 0x2f
je 0x422e66
cmp ax, 0x5c
je 0x422e66
test ax, ax
je 0x422dc3
cmp word [esp + 0x24e], 0x3a
jne 0x422dc3
push ebx
lea edx, [esp + 0x250]
push edx
lea eax, [esp + 0x45c]
push 0x46d71c
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea ecx, [esp + 0x25c]
push ecx
push 0
call fcn.00420df0
add esp, 0x18
jmp 0x422df7
mov ecx, dword [edi + 0x23c]
mov edx, dword [edi]
push ecx
push edx
call fcn.00422660
add esp, 8
cmp dword [edi + 0x240], 0
jne 0x422ec7
push 0x4000
call fcn.004505ee
add esp, 4
mov dword [edi + 0x240], eax
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x14], 0
jmp 0x422ee0
mov ecx, dword [edi + 0x240]
mov edx, dword [edi]
lea eax, [esp + 0x13]
push eax
push 0x4000
push ecx
push edx
call fcn.004227f0
mov esi, eax
add esp, 0x10
cmp esi, 0xffffff96
je 0x422f34
test esi, esi
jl 0x422f2a
jle 0x422f1f
mov ecx, dword [edi + 0x240]
push 0
lea eax, [esp + 0x1c]
push eax
push esi
push ecx
push ebx
call ebp
test eax, eax
je 0x422f3e
cmp byte [esp + 0x13], 0
jne 0x422f48
test esi, esi
jne 0x422ee0
mov dword [esp + 0x14], 0x5000000
jmp 0x422f67
mov dword [esp + 0x14], 0x1000
jmp 0x422f67
mov dword [esp + 0x14], 0x400
jmp 0x422f67
lea edx, [esp + 0x23c]
push edx
lea eax, [esp + 0x230]
push eax
lea ecx, [esp + 0x23c]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [edi]
push edx
call fcn.00420720
mov eax, dword [esp + 0x18]
add esp, 4
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x650]
pop esi
xor ecx, esp
mov dword [0x4892e4], eax
call fcn.0044ffb3
add esp, 0x650
ret