Function at 0x450160
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4af39b
mov eax, dword fs:[0]
push eax
sub esp, 0x104
mov eax, dword [0x4f0100]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov eax, edi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x18], 0
cmp dword [edi + 0x14], 7
jbe 0x4501a4
mov eax, dword [edi]
push 0
push 0
push 2
push 0
push 2
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edx, eax
mov dword [ebp - 0x1c], edx
cmp edx, 0xffffffff
jne 0x450351
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x674804]
cmp eax, dword [ecx + 4]
jle 0x45022d
push 0x674804
call fcn.0047b571
add esp, 4
cmp dword [0x674804], 0xffffffff
jne 0x45022d
mov dword [ebp - 4], 0
mov dword [ebp - 0x1c], 0x674808
mov dword [0x67482c], 0
mov byte [ebp - 4], 0
push 0x4b1840
call fcn.0047ba41
mov dword [ebp - 4], 0xffffffff
push 0x674804
call fcn.0047b520
add esp, 8
push 0x13
xorps xmm0, xmm0
mov dword [ebp - 0x48], 0
push str.open_file_error_msg
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x44], 0
movups xmmword [ebp - 0x58], xmm0
call fcn.0041cd80
mov dword [ebp - 4], 3
lea eax, [ebp - 0x58]
push eax
mov ecx, 0x674808
call fcn.0044aa90
mov edx, eax
cmp dword [eax + 0x14], 7
jbe 0x450270
mov edx, dword [eax]
mov esi, dword [eax + 0x10]
mov byte [ebp - 4], 4
mov ecx, edi
cmp dword [edi + 0x14], 7
jbe 0x450281
mov ecx, dword [edi]
mov eax, dword [edi + 0x10]
sub esp, 8
mov dword [ebp - 0x20], eax
mov eax, esp
mov dword [ebp - 0x24], ecx
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x28], 0xc0000000
push esi
mov dword [eax + 4], ecx
lea ecx, [ebp - 0x40]
push edx
mov dword [eax], 1
call fcn.0043c270
mov dword [ebp - 0x18], 1
mov byte [ebp - 4], 5
lea eax, [ebp - 0x110]
push 0xb8
push 0
push eax
call fcn.0047d590
add esp, 0x1c
lea ecx, [ebp - 0x110]
push 0x4f0c1c
call fcn.00432ae0
cmp dword [ebp - 0x2c], 7
lea edx, [ebp - 0x40]
push dword [ebp - 0x30]
cmova edx, dword [ebp - 0x40]
lea ecx, [ebp - 0x100]
mov dword [ebp - 0x18], 3
call fcn.0043d440
lea eax, [ebp - 0x100]
push eax
call fcn.0043a570
mov esi, 3
add esp, 8
mov dword [ebp - 0x18], esi
and esi, 0xfffffffd
mov dword [ebp - 0x18], esi
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x110]
call fcn.00432be0
and esi, 0xfffffffe
mov dword [ebp - 0x18], esi
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x40]
call fcn.00416820
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x58]
call fcn.00416c70
xor al, al
jmp 0x450505
mov ecx, dword [esi]
mov eax, dword [esi + 4]
lea esi, [ebp - 0x14]
push 0
push esi
sub eax, ecx
mov dword [ebp - 0x14], 0
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x1c]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jne 0x450503
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x674804]
cmp eax, dword [ecx + 4]
jle 0x4503e2
push 0x674804
call fcn.0047b571
add esp, 4
cmp dword [0x674804], 0xffffffff
jne 0x4503e2
mov dword [ebp - 4], 6
mov dword [ebp - 0x1c], 0x674808
mov dword [0x67482c], esi
mov byte [ebp - 4], 6
push 0x4b1840
call fcn.0047ba41
mov dword [ebp - 4], 0xffffffff
push 0x674804
call fcn.0047b520
add esp, 8
push 0x14
xorps xmm0, xmm0
mov dword [ebp - 0x30], 0
push str.write_file_error_msg
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x2c], 0
movups xmmword [ebp - 0x40], xmm0
call fcn.0041cd80
mov dword [ebp - 4], 9
lea eax, [ebp - 0x40]
push eax
mov ecx, 0x674808
call fcn.0044aa90
mov edx, eax
cmp dword [eax + 0x14], 7
jbe 0x450425
mov edx, dword [eax]
mov esi, dword [eax + 0x10]
mov byte [ebp - 4], 0xa
mov ecx, edi
cmp dword [edi + 0x14], 7
jbe 0x450436
mov ecx, dword [edi]
mov eax, dword [edi + 0x10]
sub esp, 8
mov dword [ebp - 0x20], eax
mov eax, esp
mov dword [ebp - 0x24], ecx
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x28], 0xc0000000
push esi
mov dword [eax + 4], ecx
lea ecx, [ebp - 0x58]
push edx
mov dword [eax], 1
call fcn.0043c270
mov dword [ebp - 0x18], 4
mov byte [ebp - 4], 0xb
lea eax, [ebp - 0x110]
push 0xb8
push 0
push eax
call fcn.0047d590
add esp, 0x1c
lea ecx, [ebp - 0x110]
push 0x4f0c1c
call fcn.00432ae0
cmp dword [ebp - 0x44], 7
lea edx, [ebp - 0x58]
push dword [ebp - 0x48]
cmova edx, dword [ebp - 0x58]
lea ecx, [ebp - 0x100]
mov dword [ebp - 0x18], 0xc
call fcn.0043d440
lea eax, [ebp - 0x100]
push eax
call fcn.0043a570
mov esi, 0xc
add esp, 8
mov dword [ebp - 0x18], esi
and esi, 0xfffffff7
mov dword [ebp - 0x18], esi
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x110]
call fcn.00432be0
and esi, 0xfffffffb
mov dword [ebp - 0x18], esi
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x58]
call fcn.00416820
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.00416c70
xor al, al
jmp 0x450505
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0047b4e2
mov esp, ebp
pop ebp
ret 8