Function at 0x4099d0
Capabilities:
Enumerate pe sections

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x1c
test edx, edx
push ebx
push ebp
push esi
push edi
mov ebp, ecx
je 0x409a66
mov ebx, dword [edx + 0x40]
test ebx, ebx
mov dword [esp + 0x30], ebx
je 0x409a66
mov ecx, 0x4e
xor eax, eax
mov edi, ebp
push 8
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x38]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor ecx, ecx
mov dword [ebp + 0x100], edx
mov cx, word [edx + 0x32]
mov dword [ebp + 0x12c], ecx
mov edx, dword [edx + 0x38]
mov dword [ebp + 0x130], edx
call sub.MFC42.DLL_operatornew
xor esi, esi
add esp, 4
cmp eax, esi
je 0x409a4c
mov dword [eax], esi
mov dword [eax + 4], esi
jmp 0x409a4e
xor eax, eax
cmp eax, esi
mov dword [ebp + 0x104], eax
jne 0x409a72
push 0x42c968
call dword [sym.imp.MSVCRT.dll_perror]
add esp, 4
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x1c
ret 0xc
xor ecx, ecx
add ebx, 5
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov edx, dword [ebp + 0x104]
lea eax, [esp + 0x10]
mov ecx, ebp
push eax
push ebx
mov dword [edx + 4], esi
call fcn.00409840
mov ecx, dword [ebp + 0x104]
mov dword [ecx], eax
mov edx, dword [ebp + 0x104]
cmp dword [edx], esi
je 0x409a66
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x38]
mov edx, dword [esp + 0x30]
add eax, 5
mov dword [ebx], eax
or ecx, 0xffffffff
lea edi, [eax + edx]
xor eax, eax
mov dword [ebp + 0x10c], edi
lea esi, [ebp + 0x114]
repne scasb al, byte es:[edi]
mov eax, dword [ebx]
not ecx
add ecx, 0x10
add eax, ecx
lea ecx, [ebp + 0x118]
push ecx
mov dword [ebx], eax
lea ecx, [esp + 0x14]
push esi
add eax, edx
push ecx
push eax
call fcn.004098c0
mov eax, dword [esi]
add esp, 0x10
test eax, eax
jne 0x409afe
push str.GetMap
jmp 0x409a5d
mov edi, dword [sym.imp.MSVCRT.dll_strrchr]
push 0x5c
push eax
mov dword [ebp + 0x110], eax
call edi
add esp, 8
mov dword [esi], eax
test eax, eax
je 0x409b1d
inc eax
mov dword [esi], eax
jmp 0x409b25
mov edx, dword [ebp + 0x110]
mov dword [esi], edx
mov eax, dword [esi]
push 0x2e
push eax
call edi
add esp, 8
test eax, eax
je 0x409b36
mov byte [eax], 0
mov eax, dword [esp + 0x10]
mov edx, dword [ebx]
lea ecx, [eax + 1]
add edx, ecx
and eax, 0x80000007
mov dword [ebx], edx
mov ecx, edx
jns 0x409b51
dec eax
or eax, 0xfffffff8
inc eax
jne 0x409b7d
mov edx, dword [esp + 0x30]
mov al, byte [ecx + edx]
cmp al, 1
je 0x409b7b
and eax, 0xff
push eax
mov eax, dword [sym.imp.MSVCRT.dll__iob]
add eax, 0x40
push str.Warning___throwaway_byte_after_map_name_is__x__not_01_n
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0xc
inc dword [ebx]
mov ecx, dword [ebx]
mov esi, dword [esp + 0x30]
mov eax, dword [ecx + esi + 2]
mov dword [ebp + 0x11c], eax
lea edx, [eax*4]
push edx
call dword [sym.imp.MSVCRT.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
mov dword [ebp + 0x108], edi
jne 0x409bb4
push str.malloc:_players
jmp 0x409a5d
mov ecx, dword [ebp + 0x11c]
xor eax, eax
shl ecx, 2
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp + 0x104]
mov ecx, dword [ebp + 0x108]
mov edx, dword [eax]
mov dword [ecx], edx
mov eax, dword [ebx]
mov cl, byte [eax + esi + 6]
mov byte [ebp + 0x124], cl
mov edx, dword [ebx]
mov al, byte [edx + esi + 7]
mov byte [ebp + 0x125], al
mov ecx, dword [ebx]
mov dx, word [ecx + esi + 8]
xor ecx, ecx
mov word [ebp + 0x126], dx
mov edi, dword [ebx]
add edi, 0xe
mov dword [esp + 0x14], ecx
mov dword [ebx], edi
mov eax, dword [ebp + 0x11c]
dec eax
mov dword [ebp + 0x120], 1
test eax, eax
jle 0x409d7d
mov edx, dword [ebx]
mov eax, dword [esp + 0x30]
cmp byte [edx + eax], 0x16
jne 0x409d3c
push 8
call sub.MFC42.DLL_operatornew
mov esi, eax
add esp, 4
test esi, esi
je 0x409d66
mov ecx, esi
xor eax, eax
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [ecx], eax
lea edx, [esp + 0x10]
push edx
mov dword [ecx + 4], eax
mov eax, dword [ebx]
mov ecx, dword [esp + 0x34]
inc eax
mov dword [ebx], eax
add eax, ecx
push eax
mov ecx, ebp
call fcn.00409840
test eax, eax
mov dword [esi], eax
je 0x409d73
mov edx, dword [esp + 0x10]
mov eax, dword [ebx]
add edx, 4
add eax, edx
mov dword [ebx], eax
mov eax, dword [ebp + 0x104]
mov dword [esi + 4], eax
mov ecx, dword [ebp + 0x11c]
mov dword [ebp + 0x104], esi
mov edx, dword [esi]
mov eax, dword [edx]
cmp eax, ecx
jbe 0x409cd9
push ecx
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
push eax
add ecx, 0x40
push str.Error___player_ID__d_is_greater_then_the_defined_number_of_positions___ld__n
push ecx
call dword [sym.imp.MSVCRT.dll_fprintf]
mov edx, dword [esi]
mov edi, dword [sym.imp.MSVCRT.dll_free]
push edx
call edi
push esi
call edi
add esp, 0x18
jmp 0x409d23
mov ecx, dword [ebp + 0x108]
mov edi, dword [ecx + eax*4 - 4]
lea ecx, [ecx + eax*4 - 4]
test edi, edi
je 0x409d14
mov edx, dword [sym.imp.MSVCRT.dll__iob]
push eax
add edx, 0x40
push str.Error___player_ID__d_already_exists__n
push edx
call dword [sym.imp.MSVCRT.dll_fprintf]
mov eax, dword [esi]
mov edi, dword [sym.imp.MSVCRT.dll_free]
push eax
call edi
push esi
call edi
add esp, 0x14
jmp 0x409d23
mov dword [ecx], edx
mov eax, dword [ebp + 0x120]
inc eax
mov dword [ebp + 0x120], eax
mov ecx, dword [esp + 0x14]
mov edx, dword [ebp + 0x11c]
inc ecx
dec edx
cmp ecx, edx
mov dword [esp + 0x14], ecx
jge 0x409d7d
jmp 0x409c29
mov edx, dword [ebx]
add eax, edx
cmp byte [eax], 0x19
je 0x409d7d
mov eax, dword [eax]
add ecx, 2
push eax
push ecx
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
push str.Expected_player__d_record__got__lx_n
add ecx, 0x40
push ecx
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0x10
jmp 0x409d7d
push str.malloc
call dword [sym.imp.MSVCRT.dll_perror]
jmp 0x409d7a
push esi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov edx, dword [ebx]
mov eax, dword [esp + 0x30]
lea edi, [edx + eax]
mov dword [esp + 0x18], edi
cmp byte [edi], 0x19
jne 0x40a0a1
xor eax, eax
xor ecx, ecx
mov ax, word [edi + 1]
mov cl, byte [edi + 3]
sub eax, 7
xor edx, edx
div ecx
test ecx, ecx
mov dword [esp + 0x14], 0
mov dword [esp + 0x28], eax
jle 0x40a034
add edi, 4
mov dword [esp + 0x24], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], edi
mov eax, dword [ebp + 0x12c]
cmp eax, 3
jge 0x409ddd
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x34], eax
jmp 0x409df4
cmp eax, 6
jg 0x409dec
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x34], ecx
jmp 0x409df0
mov dword [esp + 0x34], edi
mov eax, dword [esp + 0x34]
mov cl, byte [eax]
test cl, cl
jne 0x409e05
mov dl, byte [eax + 3]
test dl, dl
je 0x409fa0
mov dl, byte [eax + 3]
test dl, dl
je 0x409f1d
mov ecx, dword [ebp + 0x11c]
mov eax, dword [ebp + 0x120]
cmp eax, ecx
je 0x409fdb
xor edi, edi
xor ebx, ebx
cmp ecx, edi
jle 0x409e3e
mov eax, dword [ebp + 0x108]
cmp dword [eax], edi
je 0x409e3e
inc ebx
add eax, 4
cmp ebx, ecx
jl 0x409e32
cmp ebx, ecx
je 0x409ff4
push 8
inc ebx
call sub.MFC42.DLL_operatornew
mov esi, eax
add esp, 4
cmp esi, edi
je 0x40a00b
xor edx, edx
mov dword [esi], edi
mov dword [esi + 4], edi
mov dword [eax], edx
push 0x28
mov dword [eax + 4], edx
call sub.MFC42.DLL_operatornew
add esp, 4
cmp eax, edi
je 0x409e7c
mov dword [eax + 0x20], edi
mov edx, eax
jmp 0x409e7e
xor edx, edx
cmp edx, edi
mov dword [esi], edx
je 0x40a01b
mov ecx, 0xa
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x120]
inc ecx
mov dword [ebp + 0x120], ecx
mov ecx, dword [esi]
mov dword [ecx], ebx
mov eax, dword [ebp + 0x12c]
cmp eax, 3
jge 0x409eba
mov edx, dword [esi]
mov dword [edx + 4], str.Computer
jmp 0x409ef8
mov ecx, dword [esp + 0x34]
xor eax, eax
mov al, byte [ecx + 7]
sub eax, 0
je 0x409eef
dec eax
je 0x409ee4
dec eax
je 0x409ed9
mov edx, dword [esi]
mov dword [edx + 4], str.Computer_Unknown_
jmp 0x409ef8
mov eax, dword [esi]
mov dword [eax + 4], str.Computer_Insane_
jmp 0x409ef8
mov ecx, dword [esi]
mov dword [ecx + 4], str.Computer_Normal_
jmp 0x409ef8
mov edx, dword [esi]
mov dword [edx + 4], str.Computer_Easy_
mov eax, dword [ebp + 0x104]
mov edi, dword [esp + 0x24]
mov dword [esi + 4], eax
mov ecx, dword [ebp + 0x108]
mov eax, dword [esp + 0x34]
mov dword [ebp + 0x104], esi
mov edx, dword [esi]
mov dword [ecx + ebx*4 - 4], edx
jmp 0x409f25
and ecx, 0xff
mov ebx, ecx
cmp ebx, dword [ebp + 0x11c]
jg 0x409f83
mov ecx, dword [ebp + 0x108]
mov esi, dword [ecx + ebx*4 - 4]
test esi, esi
je 0x409f83
xor edx, edx
xor ecx, ecx
mov dl, byte [eax + 6]
mov dword [esi + 0xc], edx
mov edx, dword [ebp + 0x108]
mov cl, byte [eax + 4]
mov edx, dword [edx + ebx*4 - 4]
mov dword [edx + 0x14], ecx
mov al, byte [eax + 5]
cmp al, 0xd
jae 0x409f70
mov ecx, dword [ebp + 0x108]
and eax, 0xff
mov edx, dword [ecx + ebx*4 - 4]
mov dword [edx + 0x18], eax
jmp 0x409f9c
mov eax, dword [ebp + 0x108]
mov ecx, dword [eax + ebx*4 - 4]
mov dword [ecx + 0x18], 0xd
jmp 0x409f9c
mov edx, dword [sym.imp.MSVCRT.dll__iob]
push ebx
add edx, 0x40
push str.Error___received_record_for_player_id__d_which_doesnt_exist__n
push edx
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0xc
mov ebx, dword [esp + 0x38]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x28]
add edx, 7
add ecx, 8
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x20], ecx
xor ecx, ecx
mov cl, byte [edx + 3]
inc eax
add edi, esi
cmp eax, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x24], edi
jge 0x40a034
jmp 0x409dc8
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push str.Error___found_record_for_computer_player_but_all_slots_taken__n
add eax, 0x40
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 8
jmp 0x40a034
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
push str.Error___found_record_for_computer_player_but_could_not_find_free_slot__n
add ecx, 0x40
push ecx
call dword [sym.imp.MSVCRT.dll_fprintf]
jmp 0x40a02d
push str.malloc
call dword [sym.imp.MSVCRT.dll_perror]
add esp, 4
jmp 0x40a030
push esi
call dword [sym.imp.MSVCRT.dll_free]
push str.malloc
call dword [sym.imp.MSVCRT.dll_perror]
add esp, 8
mov ebx, dword [esp + 0x38]
mov eax, dword [ebp + 0x12c]
cmp eax, 3
jge 0x40a05a
mov edx, dword [esp + 0x18]
xor eax, eax
mov al, byte [edx + 3]
lea ecx, [eax*8]
sub ecx, eax
mov eax, dword [ebx]
add ecx, 4
add eax, ecx
jmp 0x40a08a
cmp eax, 6
jg 0x40a075
mov eax, dword [esp + 0x18]
xor edx, edx
mov dl, byte [eax + 3]
mov eax, dword [ebx]
lea ecx, [edx*8 + 4]
add eax, ecx
jmp 0x40a08a
mov eax, dword [esp + 0x18]
xor edx, edx
mov dl, byte [eax + 3]
mov eax, dword [ebx]
imul edx, dword [esp + 0x28]
add edx, 4
add eax, edx
mov edx, dword [esp + 0x30]
mov ecx, eax
add ecx, edx
mov dword [ebx], eax
mov dword [ebp + 0x134], ecx
mov eax, dword [ebx]
add eax, 6
mov dword [ebx], eax
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x1c
ret 0xc