Function at 0x423bd0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x29c
mov eax, dword [0x4b4810]
xor eax, esp
mov dword [esp + 0x298], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x14], ebx
cmp dword [esi + 0x14], 8
push edi
mov dword [esp + 0x1c], eax
jb 0x423c0e
mov eax, dword [esi]
jmp 0x423c10
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 0x423e87
lea ecx, [esp + 0x10]
call fcn.004242a0
cmp edi, 0xffffffff
je 0x423c5b
mov dword [esp + 0x10], edi
call fcn.004261b0
push eax
mov eax, dword [ebp + 4]
push eax
lea eax, [esp + 0x18]
push eax
push edi
call fcn.00426300
add esp, 0x10
mov eax, dword [esp + 0x10]
test eax, eax
je 0x423e87
cmp eax, 0xffffffff
je 0x423e87
mov edi, dword [esp + 0x1c]
lea ecx, [esp + 0x14]
push 0
push ecx
push edi
push dword [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x423d99
cmp dword [esp + 0x14], edi
jne 0x423c9c
mov bl, 1
jmp 0x423fa9
call fcn.00424340
cmp eax, 1
jl 0x423d65
lea eax, [esp + 0x274]
mov ebx, 0x30
push esi
push eax
call fcn.00428cf0
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 8
call esi
push 1
push 2
lea ecx, [esp + 0x48]
mov dword [esp + 0x38], eax
mov dword [esp + 0x40], 0xffffffff
call fcn.0041ee10
mov dword [esp + 0xdc], 0x412ed8
mov dword [esp + 0xe0], 0x29f
call esi
push 0x29f
push 0x412ed8
lea ecx, [esp + 0x40]
mov dword [esp + 0xec], eax
call fcn.0041fd20
lea eax, [esp + 0x274]
push eax
push 0x412f5c
push edi
push 0x412f6c
push dword [esp + 0x24]
lea eax, [esp + 0x54]
push 0x412f78
push eax
call fcn.0041b630
add esp, 8
mov ecx, eax
call fcn.004204d0
push eax
call fcn.0041b630
add esp, 8
mov ecx, eax
call fcn.00420390
push eax
call fcn.0041b630
add esp, 8
push eax
call fcn.0041b3b0
add esp, 8
test bl, 0x20
je 0x423d76
lea ecx, [esp + 0x30]
and ebx, 0xffffffdf
call fcn.00420240
test bl, 0x10
je 0x423fa7
cmp dword [esp + 0x288], 0x10
jb 0x423fa7
push dword [esp + 0x274]
jmp 0x423f9f
call fcn.00424340
cmp eax, 1
jl 0x423e50
lea eax, [esp + 0x28c]
mov ebx, 0xc
push esi
push eax
call fcn.00428cf0
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 8
call esi
push 1
push 2
lea ecx, [esp + 0x1b8]
mov dword [esp + 0x1a8], eax
mov dword [esp + 0x1b0], 0xffffffff
call fcn.0041ee10
mov dword [esp + 0x24c], 0x412ed8
mov dword [esp + 0x250], 0x29c
call esi
push 0x29c
push 0x412ed8
lea ecx, [esp + 0x1b0]
mov dword [esp + 0x25c], eax
call fcn.0041fd20
push 0x412f44
lea eax, [esp + 0x290]
push eax
lea eax, [esp + 0x1b8]
push 0x412f4c
push eax
call fcn.0041b630
add esp, 8
push eax
call fcn.0041b3b0
add esp, 8
push eax
call fcn.0041b630
add esp, 8
test bl, 8
je 0x423e64
lea ecx, [esp + 0x1a0]
and ebx, 0xfffffff7
call fcn.00420240
test bl, 4
je 0x423fa7
cmp dword [esp + 0x2a0], 0x10
jb 0x423fa7
push dword [esp + 0x28c]
jmp 0x423f9f
mov ecx, dword [0x4ba130]
test ecx, ecx
je 0x423ead
lea eax, [esp + 0x28]
mov dword [esp + 0x28], 0x412ed8
push eax
mov dword [esp + 0x30], 0x43
call fcn.00430f50
jmp 0x423ed1
mov ecx, dword [0x4ba12c]
lea eax, [esp + 0x20]
neg ecx
mov dword [esp + 0x18], 0xffffffff
cmp ecx, 0xffffffff
mov dword [esp + 0x20], ecx
lea edx, [esp + 0x18]
cmovle eax, edx
mov eax, dword [eax]
cmp eax, 1
jl 0x423f75
lea eax, [esp + 0x25c]
mov ebx, 3
push esi
push eax
call fcn.00428cf0
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 8
call esi
push 1
push 2
lea ecx, [esp + 0x100]
mov dword [esp + 0xf0], eax
mov dword [esp + 0xf8], 0xffffffff
call fcn.0041ee10
mov dword [esp + 0x194], 0x412ed8
mov dword [esp + 0x198], 0x291
call esi
push 0x291
push 0x412ed8
lea ecx, [esp + 0xf8]
mov dword [esp + 0x1a4], eax
call fcn.0041fd20
lea eax, [esp + 0x25c]
push eax
lea eax, [esp + 0xfc]
push 0x412f28
push eax
call fcn.0041b630
add esp, 8
push eax
call fcn.0041b3b0
add esp, 8
test bl, 2
je 0x423f89
lea ecx, [esp + 0xe8]
and ebx, 0xfffffffd
call fcn.00420240
test bl, 1
je 0x423fa7
cmp dword [esp + 0x270], 0x10
jb 0x423fa7
push dword [esp + 0x25c]
call fcn.0048f211
add esp, 4
xor bl, bl
mov eax, dword [esp + 0x10]
test eax, eax
je 0x423fff
cmp eax, 0xffffffff
je 0x423fff
call fcn.004261b0
push eax
mov eax, dword [ebp + 4]
push eax
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x1c]
call fcn.004263d0
mov edi, dword [esp + 0x20]
add esp, 0x10
call fcn.00426550
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push edi
mov byte [0x4ba164], 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov byte [0x4ba164], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x2a4]
mov al, bl
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00492f61
mov esp, ebp
pop ebp
ret