Function at 0x402330
Capabilities:
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
mov eax, esi
push edi
mov edi, ecx
mov dword [ebp - 0x14], edx
mov ecx, dword [ebp + 0xc]
add eax, ebx
push 0x10
adc ecx, dword [ebp + 0x14]
push ecx
push ecx
mov dword [ebp - 0x10], ecx
mov ecx, edi
push eax
call fcn.00402240
add esp, 0x10
mov ecx, edi
call fcn.00401680
mov ecx, edi
call fcn.00401790
test eax, eax
jne 0x402393
push str.timeout_reached_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
cmp dword [edi + 0x20], 6
jge 0x40239e
or ecx, 0xffffffff
jmp 0x4023b4
mov eax, dword [edi]
movzx ecx, byte [eax + 1]
movzx eax, byte [eax]
shl eax, 8
or ecx, eax
cmp ecx, 0x80
je 0x4023d6
push ecx
push str.unexpected_response__0x_04x__n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 0xc
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
push 0x40652c
push dword [ebp + 0x18]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
add esp, 8
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x40240f
push str.fopen_dump__failed_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
or eax, ecx
mov edx, dword [ebp + 0xc]
mov dword [ebp - 4], esi
mov dword [ebp - 8], edx
je 0x4025a2
mov eax, dword [ebp + 0x1c]
xor edx, edx
cmp dword [ebp - 0x10], edx
setne dl
lea edx, [edx*4 + 8]
mov dword [ebp - 0x10], edx
mov edx, dword [ebp - 8]
nop
test ecx, ecx
jb 0x40244c
ja 0x40244a
cmp ebx, eax
jbe 0x40244c
mov ebx, eax
mov eax, ebx
mov byte [ebp - 0x18], dl
shr eax, 8
mov byte [ebp - 0x1f], al
mov eax, ebx
shr eax, 0x10
mov byte [ebp - 0x1e], al
mov eax, ebx
shr eax, 0x18
mov byte [ebp - 0x1d], al
mov eax, dword [ebp - 4]
mov ecx, eax
mov byte [ebp - 0x1c], al
mov eax, edx
shrd ecx, eax, 8
push dword [ebp - 0x10]
mov byte [ebp - 0x1b], cl
mov eax, edx
mov ecx, dword [ebp - 4]
shrd ecx, eax, 0x10
mov eax, edx
mov byte [ebp - 0x20], bl
mov byte [ebp - 0x1a], cl
mov ecx, dword [ebp - 4]
shrd ecx, eax, 0x18
mov eax, edx
shr eax, 8
mov byte [ebp - 0x17], al
mov eax, edx
shr eax, 0x10
mov byte [ebp - 0x16], al
mov eax, edx
shr eax, 0x18
mov edx, 0x11
mov byte [ebp - 0x15], al
lea eax, [ebp - 0x20]
mov byte [ebp - 0x19], cl
mov ecx, edi
push eax
call fcn.00401550
add esp, 8
mov ecx, edi
call fcn.00401680
mov ecx, edi
call fcn.00401790
mov ecx, edi
call fcn.00401af0
cmp eax, 0x93
jne 0x402585
mov ecx, dword [edi]
movzx esi, byte [ecx + 2]
movzx eax, byte [ecx + 3]
shl esi, 8
or esi, eax
cmp ebx, esi
jb 0x402564
push dword [ebp - 0xc]
lea eax, [ecx + 4]
push esi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp eax, esi
jne 0x402543
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 8]
add eax, esi
mov dword [ebp - 4], eax
adc edx, 0
mov dword [ebp - 8], edx
cmp ebx, esi
jne 0x4025a5
mov ebx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
sub ebx, eax
sbb ecx, edx
add ebx, dword [ebp + 0x10]
mov eax, ebx
adc ecx, dword [ebp + 0x14]
or eax, ecx
mov eax, dword [ebp + 0x1c]
jne 0x402440
jmp 0x4025a2
push str.fwrite_dump__failed_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
push str.unexpected_length_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
push eax
push str.unexpected_response__0x_04x__n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
mov edx, dword [ebp - 8]
add esp, 0xc
mov eax, dword [ebp - 4]
mov ebx, dword [ebp + 8]
mov ecx, eax
sub ecx, ebx
mov eax, edx
mov edx, dword [ebp + 0xc]
sbb eax, edx
push eax
push ecx
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push edx
push ebx
push dword [ebp - 0x14]
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push str.dump_partition:__s0x_llx__target:_0x_llx__read:_0x_llx_n
push 2
call ebx
add esp, 4
push eax
call fcn.00401050
add esp, 0x24
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov edx, 0x12
mov ecx, edi
push 0
push 0
call fcn.00401550
add esp, 8
mov ecx, edi
call fcn.00401680
mov ecx, edi
call fcn.00401790
test eax, eax
jne 0x402629
push str.timeout_reached_n
push 2
call ebx
add esp, 4
push eax
call fcn.00401050
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
cmp dword [edi + 0x20], 6
jge 0x402634
or ecx, 0xffffffff
jmp 0x40264a
mov eax, dword [edi]
movzx ecx, byte [eax]
movzx eax, byte [eax + 1]
shl ecx, 8
or ecx, eax
cmp ecx, 0x80
je 0x402668
push ecx
push str.unexpected_response__0x_04x__n
push 2
call ebx
add esp, 4
push eax
call fcn.00401050
add esp, 0xc
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret