Function at 0x40a100
Capabilities:
Read file on windows
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x440
mov eax, dword [0x4635a0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xorps xmm0, xmm0
mov dword [ebp - 0x440], 0
push edi
mov edi, dword [ebp + 8]
movdqu xmmword [ebp - 0x43c], xmm0
mov dword [ebp - 0x428], 0
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov ebx, dword [sym.imp.WS2_32.dll_WSAEventSelect]
lea esi, [edi + 8]
push 0x21
push eax
push dword [esi]
mov dword [ebp - 0x410], eax
call ebx
mov eax, dword [edi]
mov ecx, dword [edi + 0xa0]
mov dword [ebp - 0x408], eax
lea eax, [ebp - 0x440]
push eax
push 0
push 0x200
lea eax, [ebp - 0x204]
mov dword [ebp - 0x40c], ecx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x410]
mov dword [ebp - 0x420], 0
push eax
push 3
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
sub eax, 0
je 0x40a1b2
dec eax
jne 0x40a359
jmp 0x40a250
push dword [ebp - 0x410]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push 0
push dword [ebp - 0x410]
push dword [esi]
call ebx
push dword [esi]
call fcn.0041ef60
add esp, 4
lea eax, [ebp - 0x424]
push eax
push 0x200
lea eax, [ebp - 0x404]
push eax
push esi
call fcn.0040128f
add esp, 0x10
mov dword [ebp - 0x414], eax
test eax, eax
jle 0x40a359
push 0
lea ecx, [ebp - 0x42c]
mov dword [ebp - 0x418], eax
push ecx
push eax
lea eax, [ebp - 0x404]
push eax
push dword [edi + 0x9c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a359
mov eax, dword [ebp - 0x42c]
cmp eax, dword [ebp - 0x414]
jne 0x40a359
cmp dword [ebp - 0x424], 0
jne 0x40a1d4
push 0x21
push dword [ebp - 0x410]
push dword [esi]
call ebx
push 0
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x440]
push eax
push dword [edi + 0xa0]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x40a345
cmp dword [0x463c68], 0
lea ebx, [ebp - 0x204]
je 0x40a2c4
mov eax, dword [ebp - 0x418]
mov dword [ebp - 0x414], eax
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x414]
push eax
mov eax, ebx
push eax
call fcn.00401032
add esp, 0x10
test eax, eax
mov eax, dword [ebp - 0x414]
cmovne ebx, dword [ebp - 0x420]
mov dword [ebp - 0x418], eax
push 0
push dword [ebp - 0x410]
push dword [esi]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
push dword [esi]
call fcn.0041ef60
push dword [ebp - 0x418]
push ebx
push esi
call fcn.004010aa
mov ecx, dword [ebp - 0x420]
add esp, 0x10
mov dword [ebp - 0x414], eax
test ecx, ecx
je 0x40a30b
push ecx
call dword [sym.imp.MSVCR120.dll_free]
mov eax, dword [ebp - 0x414]
add esp, 4
cmp eax, dword [ebp - 0x418]
jne 0x40a359
mov ebx, dword [sym.imp.WS2_32.dll_WSAEventSelect]
push 0x21
push dword [ebp - 0x410]
push dword [esi]
call ebx
lea eax, [ebp - 0x440]
push eax
push 0
push 0x200
lea eax, [ebp - 0x204]
push eax
push dword [edi + 0xa0]
jmp 0x40a17e
call dword [sym.imp.KERNEL32.dll_GetLastError]
add eax, 0xfffffc1c
cmp eax, 1
jbe 0x40a184
cmp dword [0x463cd0], 0
je 0x40a38a
mov eax, dword [edi + 0x90]
test eax, eax
je 0x40a38a
push eax
call sub.libssl_1_1.dll_SSL_shutdown
push dword [edi + 0x90]
call sub.libssl_1_1.dll_SSL_free
add esp, 8
mov dword [edi + 0x90], 0
push dword [ebp - 0x410]
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
push dword [edi]
call fcn.0040a6d0
add esp, 4
cmp eax, 0xffffffff
je 0x40a488
mov ebx, dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
lea eax, [ebp - 0x41c]
push eax
push dword [edi]
call ebx
cmp dword [ebp - 0x41c], 0x103
jne 0x40a401
cmp dword [0x463c18], 1
jle 0x40a3dc
push str.Subprocess_still_running__terminating_it._n
call fcn.004011ea
add esp, 4
push 0
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
jne 0x40a401
cmp dword [0x463c18], 1
jle 0x40a401
push eax
push str.TerminateProcess_failed_with_code__d._n
call fcn.004011ea
add esp, 8
lea eax, [ebp - 0x41c]
push eax
push dword [edi]
call ebx
cmp dword [0x463c18], 1
jle 0x40a428
push dword [ebp - 0x41c]
push str.Subprocess_ended_with_exit_code__d._n
call fcn.004011ea
add esp, 8
push 2
push dword [esi]
call dword [sym.imp.WS2_32.dll_shutdown]
push edi
call fcn.0040a080
push edi
call dword [sym.imp.MSVCR120.dll_free]
add esp, 8
push 0xffffffffffffffff
push dword [0x463da0]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
pop edi
pop esi
pop ebx
test eax, eax
jne 0x40a497
mov eax, dword [0x463d9c]
test eax, eax
je 0x40a462
call eax
push dword [0x463da0]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test eax, eax
je 0x40a4a6
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x41c]
xor ecx, ebp
call fcn.0044590e
mov esp, ebp
pop ebp
ret 4
push str.rc____1
push str.assertion_failed:__s
call fcn.004010f0
push str.rc__WAIT_OBJECT_0
push str.assertion_failed:__s
call fcn.004010f0
push str.rc___0
push str.assertion_failed:__s
call fcn.004010f0
int3