Function at 0x401e98
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
and dword [ebp - 0xc], 0
and dword [ebp - 0x18], 0
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, eax
mov eax, dword [esi + 0x10]
push edi
mov dword [ebp - 0x2c], eax
push 2
pop ecx
mov eax, esi
call fcn.004016a0
test eax, eax
je 0x401ed3
push dword [ebp + 0xc]
push str._RI___d_bytes
push ecx
call fcn.00401643
add esp, 0xc
test ebx, ebx
je 0x40224a
cmp dword [ebp + 0xc], 0x18
jl 0x40224a
mov edx, dword [ebx + 8]
mov eax, dword [esi]
mov cl, byte [ebx + 4]
sub dword [ebp + 0xc], 0x18
mov dword [ebp - 0x10], edx
mov edx, dword [ebx + 0xc]
mov dword [ebp - 0x28], eax
mov al, byte [ebx + 5]
mov dword [ebp - 8], edx
mov edx, dword [ebx + 0x10]
mov byte [ebp - 1], al
movzx eax, word [ebx + 6]
mov dword [ebp - 0x1c], edx
mov edx, dword [ebx + 0x14]
add ebx, 0x18
mov byte [ebp + 0xb], cl
mov dword [ebp - 0x14], edx
cmp dword [ebp + 0xc], edx
jl 0x402245
test edx, edx
js 0x402245
cmp cl, 0x51
je 0x401f42
cmp cl, 0x52
je 0x401f42
cmp cl, 0x53
je 0x401f42
cmp cl, 0x54
jne 0x402241
lea edi, [esi + 0x94]
mov dword [ebp - 0x20], eax
mov dword [esi + 0x40], eax
mov eax, dword [edi]
cmp eax, edi
je 0x401f8b
mov edx, dword [ebp - 0x1c]
sub edx, dword [eax + 0x1c]
mov ecx, dword [eax]
mov dword [ebp - 0x24], ecx
test edx, edx
jle 0x401f88
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov ecx, dword [eax + 4]
mov edx, dword [eax]
mov dword [ecx], edx
and dword [eax], 0
and dword [eax + 4], 0
push eax
call fcn.00401633
mov eax, dword [ebp - 0x24]
dec dword [esi + 0x60]
pop ecx
cmp eax, edi
jne 0x401f54
mov cl, byte [ebp + 0xb]
mov eax, dword [edi]
cmp eax, edi
je 0x401f96
mov eax, dword [eax + 0x1c]
jmp 0x401f99
mov eax, dword [esi + 0x14]
mov dword [esi + 0x10], eax
cmp cl, 0x52
jne 0x40206a
mov edi, dword [esi + 0x4c]
sub edi, dword [ebp - 0x10]
js 0x401fb4
mov ecx, esi
call fcn.00401cb3
mov eax, dword [ebp - 8]
sub eax, dword [esi + 0x10]
js 0x402005
mov eax, dword [ebp - 8]
sub eax, dword [esi + 0x14]
jns 0x402005
lea ecx, [esi + 0x94]
mov eax, dword [ecx]
jmp 0x401fdf
mov edx, dword [eax + 0x1c]
cmp dword [ebp - 8], edx
je 0x401fe5
mov edi, dword [ebp - 8]
sub edi, edx
js 0x402005
mov eax, dword [eax]
cmp eax, ecx
jne 0x401fce
jmp 0x402005
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov ecx, dword [eax + 4]
mov edx, dword [eax]
mov dword [ecx], edx
and dword [eax], 0
and dword [eax + 4], 0
push eax
call fcn.00401633
dec dword [esi + 0x60]
pop ecx
lea eax, [esi + 0x94]
mov ecx, dword [eax]
cmp ecx, eax
je 0x402016
mov eax, dword [ecx + 0x1c]
jmp 0x402019
mov eax, dword [esi + 0x14]
cmp dword [ebp - 0x18], 0
mov edx, dword [ebp - 8]
mov dword [esi + 0x10], eax
jne 0x40202e
mov dword [ebp - 0x18], 1
jmp 0x402037
mov eax, edx
sub eax, dword [ebp - 0xc]
test eax, eax
jle 0x40203a
mov dword [ebp - 0xc], edx
push 0x20
pop ecx
mov eax, esi
call fcn.004016a0
test eax, eax
je 0x402169
push dword [esi + 0x30]
mov eax, dword [esi + 0x4c]
sub eax, dword [ebp - 0x10]
push eax
push edx
push str.input_ack:_sn_lu_rtt_ld_rto_ld
push ecx
call fcn.00401643
add esp, 0x14
jmp 0x402169
cmp cl, 0x51
jne 0x402119
push 0x10
pop ecx
mov eax, esi
call fcn.004016a0
test eax, eax
je 0x402095
push dword [ebp - 0x10]
push dword [ebp - 8]
push str.input_psh:_sn_lu_ts_lu
push ecx
call fcn.00401643
add esp, 0x10
mov eax, dword [ebp - 8]
sub eax, dword [esi + 0x3c]
sub eax, dword [esi + 0x18]
jns 0x402169
push dword [ebp - 0x10]
push dword [ebp - 8]
call fcn.00401d30
mov eax, dword [ebp - 8]
sub eax, dword [esi + 0x18]
pop ecx
pop ecx
js 0x402169
mov eax, dword [ebp - 0x14]
add eax, 0x3c
push eax
call fcn.00401623
mov edi, eax
mov eax, dword [ebp - 0x28]
mov dword [edi + 8], eax
movzx eax, byte [ebp - 1]
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x20]
mov dword [edi + 0x14], eax
mov eax, dword [ebp - 0x10]
mov dword [edi + 0x18], eax
mov eax, dword [ebp - 8]
mov dword [edi + 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [edi + 0x20], eax
mov eax, dword [ebp - 0x14]
pop ecx
mov dword [edi + 0xc], 0x51
mov dword [edi + 0x24], eax
test eax, eax
je 0x402110
push eax
lea eax, [edi + 0x38]
push ebx
push eax
call fcn.00506bd0
add esp, 0xc
mov ecx, edi
call fcn.00401dd8
jmp 0x402169
cmp cl, 0x53
jne 0x40213f
or dword [esi + 0x48], 2
push 0x40
pop ecx
mov eax, esi
call fcn.004016a0
test eax, eax
je 0x402169
push str.input_probe
push ecx
call fcn.00401643
pop ecx
pop ecx
jmp 0x402169
cmp cl, 0x54
jne 0x402241
mov ecx, 0x80
mov eax, esi
call fcn.004016a0
test eax, eax
je 0x402169
push dword [ebp - 0x20]
push str.input_wins:__lu
push ecx
call fcn.00401643
add esp, 0xc
mov eax, dword [ebp - 0x14]
sub dword [ebp + 0xc], eax
add ebx, eax
cmp dword [ebp + 0xc], 0x18
jge 0x401ee5
cmp dword [ebp - 0x18], 0
je 0x4021b7
mov eax, dword [ebp - 0xc]
sub eax, dword [esi + 0x10]
js 0x4021b7
mov eax, dword [ebp - 0xc]
sub eax, dword [esi + 0x14]
jns 0x4021b7
lea edx, [esi + 0x94]
mov eax, dword [edx]
cmp eax, edx
je 0x4021b7
mov ecx, dword [eax + 0x1c]
mov ebx, dword [ebp - 0xc]
sub ebx, ecx
mov edi, dword [eax]
js 0x4021b7
cmp dword [ebp - 0xc], ecx
je 0x4021b1
inc dword [eax + 0x30]
mov eax, edi
cmp edi, edx
jne 0x40219d
mov eax, dword [esi + 0x10]
sub eax, dword [ebp - 0x2c]
test eax, eax
jle 0x40223d
mov edi, dword [esi + 0x44]
mov eax, dword [esi + 0x40]
cmp edi, eax
jae 0x40223d
mov ecx, dword [esi + 8]
cmp edi, dword [esi + 0x24]
jae 0x4021df
inc edi
add dword [esi + 0x80], ecx
mov dword [esi + 0x44], edi
jmp 0x40222c
cmp dword [esi + 0x80], ecx
jae 0x4021ed
mov dword [esi + 0x80], ecx
mov ebx, dword [esi + 0x80]
mov eax, ecx
imul eax, ecx
xor edx, edx
div ebx
mov edx, ecx
shr edx, 4
add eax, ebx
add eax, edx
inc edi
imul edi, ecx
mov dword [esi + 0x80], eax
cmp edi, eax
ja 0x402229
test ecx, ecx
je 0x40221b
mov edi, ecx
jmp 0x40221e
xor edi, edi
inc edi
lea eax, [eax + ecx - 1]
xor edx, edx
div edi
mov dword [esi + 0x44], eax
mov eax, dword [esi + 0x40]
cmp dword [esi + 0x44], eax
jbe 0x40223d
mov dword [esi + 0x44], eax
imul eax, ecx
mov dword [esi + 0x80], eax
xor eax, eax
jmp 0x40224d
push 0xfffffffffffffffd
jmp 0x402247
push 0xfffffffffffffffe
pop eax
jmp 0x40224d
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret