Function at 0x402200
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x24
push ebx
mov ebx, dword [esp + 0x30]
push ebp
mov ebp, dword [esp + 0x30]
mov eax, dword [ebp + 0x10]
push esi
push edi
xor edi, edi
test byte [ebp + 0xc8], 2
mov dword [esp + 0x30], eax
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
je 0x402247
cmp dword [ebp + 0xd0], edi
je 0x402247
mov ecx, dword [esp + 0x40]
push ecx
push str._RI___d_bytes
push 2
mov esi, ebp
call fcn.004016b0
add esp, 0xc
cmp ebx, edi
je 0x40259d
cmp dword [esp + 0x40], 0x18
jl 0x40259d
lea ebx, [ebx]
mov al, byte [ebx + 5]
mov edx, dword [ebp]
mov edi, dword [esp + 0x40]
mov cl, byte [ebx + 4]
mov esi, dword [ebx + 0x10]
mov byte [esp + 0x38], al
mov eax, dword [ebx + 8]
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0xc]
mov dword [esp + 0x28], edx
movzx edx, word [ebx + 6]
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x14]
sub edi, 0x18
add ebx, 0x18
mov byte [esp + 0x3c], cl
mov dword [esp + 0x2c], esi
mov dword [esp + 0x24], eax
mov dword [esp + 0x40], edi
cmp edi, eax
jl 0x402590
test eax, eax
js 0x402590
cmp cl, 0x51
je 0x4022cb
cmp cl, 0x52
je 0x4022cb
cmp cl, 0x53
je 0x4022cb
cmp cl, 0x54
jne 0x402583
mov eax, edx
push esi
mov edi, ebp
mov dword [esp + 0x24], eax
mov dword [ebp + 0x40], eax
call fcn.00401f60
mov eax, dword [ebp + 0x94]
lea esi, [ebp + 0x94]
add esp, 4
cmp eax, esi
je 0x4022f7
mov ecx, dword [eax + 0x1c]
mov dword [ebp + 0x10], ecx
jmp 0x4022fd
mov edx, dword [ebp + 0x14]
mov dword [ebp + 0x10], edx
mov al, byte [esp + 0x3c]
cmp al, 0x52
jne 0x4023a0
mov edi, dword [ebp + 0x4c]
sub edi, dword [esp + 0x14]
js 0x402319
mov ecx, ebp
call fcn.00401e50
mov edx, dword [esp + 0x10]
mov edi, ebp
call fcn.00401ee0
mov eax, dword [esi]
cmp eax, esi
je 0x402332
mov eax, dword [eax + 0x1c]
mov dword [ebp + 0x10], eax
jmp 0x402338
mov ecx, dword [ebp + 0x14]
mov dword [ebp + 0x10], ecx
cmp dword [esp + 0x1c], 0
jne 0x402351
mov edx, dword [esp + 0x10]
mov dword [esp + 0x1c], 1
mov dword [esp + 0x18], edx
jmp 0x402365
mov eax, dword [esp + 0x10]
sub eax, dword [esp + 0x18]
test eax, eax
jle 0x402365
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x18], ecx
mov ecx, 0x20
mov eax, ebp
call fcn.00401730
test eax, eax
je 0x4024ca
mov eax, dword [ebp + 0x4c]
mov edx, dword [ebp + 0x30]
sub eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push edx
push eax
push ecx
push str.input_ack:_sn_lu_rtt_ld_rto_ld
push 0x20
mov esi, ebp
call fcn.004016b0
add esp, 0x14
jmp 0x4024ca
cmp al, 0x51
jne 0x402473
mov ecx, 0x10
mov eax, ebp
call fcn.00401730
test eax, eax
je 0x4023d2
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
push edx
push eax
push str.input_psh:_sn_lu_ts_lu
push ecx
mov esi, ebp
call fcn.004016b0
add esp, 0x10
mov eax, dword [esp + 0x10]
mov ecx, eax
sub ecx, dword [ebp + 0x3c]
sub ecx, dword [ebp + 0x18]
jns 0x4024ca
mov edx, dword [esp + 0x14]
push edx
push eax
mov esi, ebp
call fcn.00402010
mov eax, dword [esp + 0x18]
add esp, 8
sub eax, dword [ebp + 0x18]
js 0x4024ca
mov edi, dword [esp + 0x24]
mov ecx, dword [0x5ea780]
lea eax, [edi + 0x3c]
push eax
test ecx, ecx
je 0x402417
call ecx
jmp 0x40241c
call fcn.0054e44e
movzx edx, byte [esp + 0x3c]
mov ecx, dword [esp + 0x2c]
mov esi, eax
mov eax, dword [esp + 0x24]
mov dword [esi + 8], ecx
mov ecx, dword [esp + 0x18]
mov dword [esi + 0x10], edx
mov edx, dword [esp + 0x14]
mov dword [esi + 0x14], eax
mov eax, dword [esp + 0x30]
add esp, 4
mov dword [esi + 0xc], 0x51
mov dword [esi + 0x18], ecx
mov dword [esi + 0x1c], edx
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], edi
test edi, edi
je 0x402468
push edi
lea ecx, [esi + 0x38]
push ebx
push ecx
call fcn.005519f0
add esp, 0xc
mov ecx, esi
mov esi, ebp
call fcn.004020f0
jmp 0x4024ca
cmp al, 0x53
jne 0x40249d
or dword [ebp + 0x48], 2
mov ecx, 0x40
mov eax, ebp
call fcn.00401730
test eax, eax
je 0x4024ca
push str.input_probe
push ecx
mov esi, ebp
call fcn.004016b0
add esp, 8
jmp 0x4024ca
cmp al, 0x54
jne 0x402583
mov ecx, 0x80
mov eax, ebp
call fcn.00401730
test eax, eax
je 0x4024ca
mov edx, dword [esp + 0x20]
push edx
push str.input_wins:__lu
push ecx
mov esi, ebp
call fcn.004016b0
add esp, 0xc
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x40]
sub eax, ecx
add ebx, ecx
mov dword [esp + 0x40], eax
cmp eax, 0x18
jge 0x402260
cmp dword [esp + 0x1c], 0
je 0x4024f5
mov esi, dword [esp + 0x18]
mov eax, ebp
call fcn.00401fd0
mov eax, dword [ebp + 0x10]
sub eax, dword [esp + 0x30]
test eax, eax
jle 0x402579
mov edi, dword [ebp + 0x44]
mov ebx, dword [ebp + 0x40]
cmp edi, ebx
jae 0x402579
mov ecx, dword [ebp + 8]
cmp edi, dword [ebp + 0x24]
jae 0x40251e
inc edi
add dword [ebp + 0x80], ecx
mov dword [ebp + 0x44], edi
jmp 0x402568
cmp dword [ebp + 0x80], ecx
jae 0x40252c
mov dword [ebp + 0x80], ecx
mov esi, dword [ebp + 0x80]
mov eax, ecx
imul eax, ecx
xor edx, edx
div esi
inc edi
imul edi, ecx
mov edx, ecx
shr edx, 4
add eax, esi
add eax, edx
mov dword [ebp + 0x80], eax
cmp edi, eax
ja 0x402568
mov esi, ecx
test ecx, ecx
jne 0x40255d
mov esi, 1
lea eax, [eax + ecx - 1]
xor edx, edx
div esi
mov dword [ebp + 0x44], eax
cmp dword [ebp + 0x44], ebx
jbe 0x402579
mov dword [ebp + 0x44], ebx
imul ebx, ecx
mov dword [ebp + 0x80], ebx
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
pop edi
pop esi
pop ebp
mov eax, 0xfffffffd
pop ebx
add esp, 0x24
ret
pop edi
pop esi
pop ebp
mov eax, 0xfffffffe
pop ebx
add esp, 0x24
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x24
ret