Function at 0x42c940
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c4
mov eax, dword [0x4d33b4]
xor eax, esp
mov dword [esp + 0x2c0], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x18], ebx
cmp dword [esi + 0x14], 8
push edi
mov dword [esp + 0x28], eax
jb 0x42c97e
mov eax, dword [esi]
jmp 0x42c980
mov eax, esi
push 0
push 0
push 3
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [esp + 0x10], ebx
test edi, edi
je 0x42cc85
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x10]
mov dword [esp + 0x24], eax
call fcn.0042d090
cmp edi, 0xffffffff
je 0x42c9f5
mov dword [esp + 0x10], edi
call fcn.0042aa20
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 4]
mov ecx, dword [0x4d83a8]
mov dword [esp + 0x14], eax
test ecx, ecx
jne 0x42c9e2
call fcn.0042ab60
mov ecx, dword [0x4d83a8]
push dword [esp + 0x20]
mov eax, dword [ecx]
lea edx, [esp + 0x14]
push dword [esp + 0x18]
push edx
push edi
call dword [eax + 4]
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x42cc85
cmp eax, 0xffffffff
je 0x42cc85
mov edi, dword [esp + 0x28]
lea ecx, [esp + 0x18]
push 0
push ecx
push edi
push dword [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x42cb6d
cmp dword [esp + 0x18], edi
jne 0x42ca40
mov bl, 1
jmp 0x42cd85
mov ecx, dword [0x4d8388]
test ecx, ecx
je 0x42ca66
lea eax, [esp + 0x40]
mov dword [esp + 0x40], 0x416078
push eax
mov dword [esp + 0x48], 0x43
call fcn.00439260
jmp 0x42ca8a
mov ecx, dword [0x4d8374]
lea eax, [esp + 0x14]
neg ecx
mov dword [esp + 0x30], 0xffffffff
cmp ecx, 0xffffffff
mov dword [esp + 0x14], ecx
lea edx, [esp + 0x30]
cmovle eax, edx
mov eax, dword [eax]
cmp eax, 1
jl 0x42cb2e
sub esp, 8
mov ebx, 0x30
cmp dword [esi + 0x14], 8
mov ecx, esp
jb 0x42caa7
mov eax, dword [esi]
jmp 0x42caa9
mov eax, esi
mov dword [ecx], eax
mov eax, dword [esi + 0x10]
mov dword [ecx + 4], eax
lea eax, [esp + 0x28c]
push eax
call fcn.00429d10
add esp, 0xc
mov esi, eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push 0xffffffffffffffff
push 0x2af
push 0x416078
lea ecx, [esp + 0x6c]
mov dword [esp + 0x64], eax
call fcn.0041b540
push esi
push 0x4160fc
push edi
push 0x41610c
push dword [esp + 0x28]
lea eax, [esp + 0x7c]
push 0x416118
push eax
call fcn.004200c0
add esp, 8
mov ecx, eax
call fcn.0041ca70
push eax
call fcn.004200c0
add esp, 8
mov ecx, eax
call fcn.0041cb80
push eax
call fcn.004200c0
add esp, 8
push eax
call fcn.00420330
add esp, 8
test bl, 0x20
je 0x42cb3f
lea ecx, [esp + 0x58]
and ebx, 0xffffffdf
call fcn.0041be60
test bl, 0x10
je 0x42cd83
mov eax, dword [esp + 0x298]
cmp eax, 0x10
jb 0x42cd83
inc eax
lea ecx, [esp + 0x284]
push eax
push dword [esp + 0x288]
jmp 0x42cd7e
mov ecx, dword [0x4d8388]
test ecx, ecx
je 0x42cb93
lea eax, [esp + 0x48]
mov dword [esp + 0x48], 0x416078
push eax
mov dword [esp + 0x50], 0x43
call fcn.00439260
jmp 0x42cbb7
mov ecx, dword [0x4d8374]
lea eax, [esp + 0x34]
neg ecx
mov dword [esp + 0x38], 0xffffffff
cmp ecx, 0xffffffff
mov dword [esp + 0x34], ecx
lea edx, [esp + 0x38]
cmovle eax, edx
mov eax, dword [eax]
cmp eax, 1
jl 0x42cc43
push 0x4160e4
sub esp, 8
mov ebx, 0xc
cmp dword [esi + 0x14], 8
mov ecx, esp
jb 0x42cbd9
mov eax, dword [esi]
jmp 0x42cbdb
mov eax, esi
mov dword [ecx], eax
mov eax, dword [esi + 0x10]
mov dword [ecx + 4], eax
lea eax, [esp + 0x2a8]
push eax
call fcn.00429d10
add esp, 0xc
mov esi, eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push 0xffffffffffffffff
push 0x2ac
push 0x416078
lea ecx, [esp + 0x128]
mov dword [esp + 0x120], eax
call fcn.0041b540
push esi
lea eax, [esp + 0x128]
push 0x4160ec
push eax
call fcn.004200c0
add esp, 8
push eax
call fcn.00420330
add esp, 8
push eax
call fcn.004200c0
add esp, 8
test bl, 8
je 0x42cc57
lea ecx, [esp + 0x110]
and ebx, 0xfffffff7
call fcn.0041be60
test bl, 4
je 0x42cd83
mov eax, dword [esp + 0x2b0]
cmp eax, 0x10
jb 0x42cd83
inc eax
lea ecx, [esp + 0x29c]
push eax
push dword [esp + 0x2a0]
jmp 0x42cd7e
mov ecx, dword [0x4d8388]
test ecx, ecx
je 0x42ccab
lea eax, [esp + 0x50]
mov dword [esp + 0x50], 0x416078
push eax
mov dword [esp + 0x58], 0x43
call fcn.00439260
jmp 0x42cccf
mov ecx, dword [0x4d8374]
lea eax, [esp + 0x3c]
neg ecx
mov dword [esp + 0x1c], 0xffffffff
cmp ecx, 0xffffffff
mov dword [esp + 0x3c], ecx
lea edx, [esp + 0x1c]
cmovle eax, edx
mov eax, dword [eax]
cmp eax, 1
jl 0x42cd49
sub esp, 8
mov ebx, 3
cmp dword [esi + 0x14], 8
mov ecx, esp
jb 0x42cce8
mov eax, dword [esi]
jmp 0x42ccea
mov eax, esi
mov dword [ecx], eax
mov eax, dword [esi + 0x10]
mov dword [ecx + 4], eax
lea eax, [esp + 0x2bc]
push eax
call fcn.00429d10
add esp, 0xc
mov esi, eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push 0xffffffffffffffff
push 0x2a1
push 0x416078
lea ecx, [esp + 0x1dc]
mov dword [esp + 0x1d4], eax
call fcn.0041b540
push esi
lea eax, [esp + 0x1dc]
push 0x4160c8
push eax
call fcn.004200c0
add esp, 8
push eax
call fcn.00420330
add esp, 8
test bl, 2
je 0x42cd5d
lea ecx, [esp + 0x1c8]
and ebx, 0xfffffffd
call fcn.0041be60
test bl, 1
je 0x42cd83
mov eax, dword [esp + 0x2c8]
cmp eax, 0x10
jb 0x42cd83
inc eax
lea ecx, [esp + 0x2b4]
push eax
push dword [esp + 0x2b8]
call fcn.0041e500
xor bl, bl
lea ecx, [esp + 0x10]
call fcn.0042d090
mov ecx, dword [esp + 0x2cc]
mov al, bl
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004aab4c
mov esp, ebp
pop ebp
ret