Function at 0x402d40
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 0x38], edx
push edi
mov esi, ecx
push ebx
push ebx
lea edx, [ebx + 0x2d]
mov dword [ebp - 0x34], esi
call fcn.00401550
add esp, 8
mov ecx, esi
call fcn.00401680
mov ecx, esi
call fcn.00401790
cmp dword [esi + 0x20], 6
jge 0x402d83
or ecx, 0xffffffff
jmp 0x402d99
mov edi, dword [esi]
movzx eax, byte [edi]
movzx ecx, byte [edi + 1]
shl eax, 8
or ecx, eax
cmp ecx, 0xba
je 0x402dbb
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]
movzx esi, byte [edi + 2]
movzx eax, byte [edi + 3]
shl esi, 8
or esi, eax
mov eax, 0xaf286bcb
mul esi
mov eax, esi
mov ecx, esi
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 6
mov dword [ebp - 0x30], eax
imul eax, eax, 0x4c
sub ecx, eax
je 0x402e08
push esi
push str.not_divisible_by_struct_size__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]
mov esi, dword [ebp - 0x38]
mov ecx, 0x406764
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402e32
test dl, dl
je 0x402e2e
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402e32
add eax, 2
add ecx, 2
test dl, dl
jne 0x402e12
xor eax, eax
jmp 0x402e37
sbb eax, eax
or eax, 1
test eax, eax
je 0x402e84
push 0x40652c
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x402e71
push str.fopen_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._Partitions__n
push ebx
call fcn.00401050
mov edi, dword [ebp - 0x34]
add esp, 8
mov edi, dword [edi]
lea esi, [edi + 4]
xor edi, edi
cmp dword [ebp - 0x30], edi
jbe 0x402f45
mov edx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
xor eax, eax
nop word [eax + eax]
cmp eax, 0x24
jae 0x402f81
movzx ecx, word [esi + eax*2]
mov byte [ebp + eax - 0x2c], cl
cmp ecx, 0x100
jae 0x402ebe
inc eax
test ecx, ecx
jne 0x402ea0
test ecx, ecx
jne 0x402f81
movzx ecx, byte [esi + 0x4b]
movzx eax, byte [esi + 0x4a]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0x49]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0x48]
shl ecx, 8
or ecx, eax
push ecx
mov eax, ecx
shr eax, 0xa
push eax
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x2c]
push eax
push edi
push str.__d___s___u___u__n
push 2
call edx
add esp, 4
push eax
call fcn.00401050
add esp, 0x18
test ebx, ebx
je 0x402f38
lea eax, [ebp - 0x2c]
push eax
push str._____Partition_id__s__size_
push ebx
call fcn.00401050
lea eax, [edi + 1]
add esp, 0xc
cmp eax, dword [ebp - 0x30]
je 0x402f6f
push dword [ebp - 0x34]
push str._u____n
push ebx
call fcn.00401050
add esp, 0xc
inc edi
add esi, 0x4c
cmp edi, dword [ebp - 0x30]
jb 0x402e92
test ebx, ebx
je 0x402f5e
push str.__Partitions__n
push ebx
call fcn.00401050
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0xc
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00404e5a
mov esp, ebp
pop ebp
ret
push 0xffffffffffffffff
push str.0x_x____n
push ebx
call fcn.00401050
add esp, 0xc
jmp 0x402f49
push str.bad_partition_name_n
push 2
call edx
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]
int3