Function at 0x402bb0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x417e6b
mov eax, dword fs:[0]
push eax
sub esp, 0xd0
mov eax, dword [0x420008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0xdc], esi
mov eax, dword [ebp + 0x10]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x58], eax
mov eax, dword [esi + 0x38]
cmp eax, 0xffffffff
je 0x402bfc
cmp dword [esi + 0x3c], 0xffffffff
jne 0x402c0b
call fcn.00403bc0
mov ecx, esi
call fcn.00403fd0
mov eax, dword [esi + 0x38]
cmp eax, 0xffffffff
je 0x402d09
cmp dword [esi + 0x3c], 0xffffffff
je 0x402d09
push 0
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x14], 0
push ecx
push 0xc
lea ecx, [ebp - 0x1c]
xorps xmm0, xmm0
push ecx
movq qword [ebp - 0x1c], xmm0
push eax
mov word [ebp - 0x1c], 0xe51c
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x402c58
mov ecx, esi
call fcn.00403bc0
mov ecx, esi
call fcn.00403fd0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [edi + 0x14], 8
mov dword [ebp - 0xdc], eax
jb 0x402c6c
mov edi, dword [edi]
mov dword [eax], 0
lea eax, [ebp - 0xd8]
push 0xa
push eax
push edi
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstol]
add esp, 0xc
mov ecx, eax
cmp edi, dword [ebp - 0xd8]
jne 0x402c9a
push 0x419d54
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xinvalid_argument_char_const__]
mov eax, dword [ebp - 0xdc]
cmp dword [eax], 0x22
je 0x402cfe
mov al, byte [ebp + 0xc]
mov edi, dword [ebp + 0x14]
push 0
mov byte [ebp - 0x19], al
lea eax, [ebp - 0x5c]
push eax
push 0xc
lea eax, [ebp - 0x1c]
mov byte [ebp - 0x1b], 0xe1
push eax
push dword [esi + 0x38]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x402ed6
mov ecx, dword [ebp - 0x58]
test ecx, ecx
je 0x402cf1
test edi, edi
jle 0x402cf1
push 0
lea eax, [ebp - 0x5c]
push eax
push edi
push ecx
push dword [esi + 0x38]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x402ed8
jmp 0x402ed6
push str.stoi_argument_out_of_range
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xout_of_range_char_const__]
push 0x5c
lea eax, [ebp - 0xd4]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0xd4]
push 2
call fcn.0040b6a0
sub esp, 0x18
mov dword [ebp - 4], 0
mov ecx, esp
push edi
call fcn.00404370
lea ecx, [ebp - 0xd4]
call fcn.0040c1a0
xorps xmm0, xmm0
mov dword [ebp - 0x60], 0
lea ecx, [ebp - 0x78]
movq qword [ebp - 0x68], xmm0
movups xmmword [ebp - 0x78], xmm0
call fcn.00415430
push str.Result
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], 1
call fcn.004158f0
mov edi, eax
lea esi, [ebp - 0x2a]
xor ecx, ecx
nop dword [eax]
mov eax, 0xcccccccd
sub esi, 2
mul ecx
shr edx, 3
lea eax, [edx + edx*4]
add eax, eax
sub ecx, eax
add ecx, 0x30
mov word [esi], cx
mov ecx, edx
test ecx, ecx
jne 0x402d80
xor eax, eax
mov dword [ebp - 0x18], edx
mov word [ebp - 0x28], ax
mov ecx, 7
lea eax, [ebp - 0x2a]
mov dword [ebp - 0x14], ecx
cmp esi, eax
je 0x402dc9
sub eax, esi
lea ecx, [ebp - 0x28]
sar eax, 1
push eax
push esi
call fcn.00402320
mov ecx, dword [ebp - 0x14]
cmp ecx, 8
mov byte [ebp - 4], 2
lea eax, [ebp - 0x28]
mov ecx, edi
cmovae eax, dword [ebp - 0x28]
push eax
call fcn.00416270
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x402e1f
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x402e15
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x402e15
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00416baa
add esp, 8
mov esi, dword [edi + 4]
mov edi, dword [ebp - 0x78]
mov eax, dword [esi + 4]
cmp eax, dword [edi + 4]
jne 0x402e5f
push esi
call fcn.00412040
mov eax, dword [edi + 0x20]
test eax, eax
je 0x402e48
mov dword [eax + 0x28], esi
mov eax, dword [edi + 0x20]
mov dword [esi + 0x24], eax
mov dword [edi + 0x20], esi
jmp 0x402e55
mov dword [edi + 0x20], esi
mov dword [edi + 0x1c], esi
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
mov dword [esi + 8], edi
lea ecx, [ebp - 0x78]
call fcn.00415800
push dword [ebp - 0x84]
mov ecx, dword [ebp - 0xd0]
mov edi, eax
push dword [ebp - 0x90]
call fcn.00415ef0
mov ecx, eax
call fcn.00416370
mov esi, eax
mov ecx, dword [esi + 4]
call fcn.00411b30
push ecx
push edi
mov ecx, esi
call fcn.00416470
mov ecx, dword [ebp - 0xdc]
mov eax, dword [ecx + 0x14]
mov ecx, dword [ecx + 0x64]
mov dword [ebp - 0x58], eax
test ecx, ecx
jne 0x402eb3
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xbad_function_call_void_]
mov eax, dword [ecx]
lea edx, [ebp - 0xd4]
push edx
lea edx, [ebp - 0x58]
push edx
call dword [eax + 8]
lea ecx, [ebp - 0x78]
call fcn.004154d0
lea ecx, [ebp - 0xd4]
call fcn.0040b7d0
xor eax, eax
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.004168de
mov esp, ebp
pop ebp
ret 0x10