Function at 0x4040f0
Capabilities:
Enumerate pe sections

Disassembly:
push ebx
push esi
push edi
mov edi, dword [esp + 0x10]
mov esi, ecx
mov ax, word [edi + 8]
mov word [esi + 0x61], ax
mov cx, word [edi + 0xa]
mov ax, word [esp + 0x14]
mov word [esi + 0x5f], cx
mov cx, word [esp + 0x18]
mov dx, word [edi + 0xe]
mov word [esi + 0x6d], cx
mov cx, word [esi + 0x61]
mov word [esi + 0x5d], dx
mov word [esi + 0x6b], ax
mov ax, word [edi + 6]
cmp cx, 1
jne 0x40413e
cmp ax, 0x3e8
jle 0x40413e
sub eax, 0x3e8
jmp 0x40414f
cmp cx, 2
jne 0x40414f
cmp ax, 0x3e8
jge 0x40414f
add eax, 0x3e8
movsx edx, ax
xor eax, eax
push edx
mov ax, word [edi + 4]
mov ecx, 0x47bd08
push eax
call fcn.00433f80
xor ebx, ebx
mov dword [esi + 0x4c], eax
cmp eax, ebx
jne 0x404194
xor ecx, ecx
xor edx, edx
mov cx, word [edi + 6]
mov dx, word [edi + 4]
push ecx
push edx
mov ecx, 0x47bd08
call fcn.00433f80
cmp eax, ebx
mov dword [esi + 0x4c], eax
jne 0x404194
pop edi
pop esi
xor eax, eax
pop ebx
ret 0xc
movsx eax, word [esi + 0x61]
sub eax, ebx
je 0x4041d1
dec eax
je 0x4041c5
dec eax
jne 0x4041fc
mov eax, dword [esi + 0x4c]
mov cx, word [0x47bc20]
sub cx, word [eax + 6]
mov word [esi + 0x59], cx
mov dx, word [0x47bc1c]
sub dx, word [eax + 8]
mov word [esi + 0x5b], dx
jmp 0x4041fc
mov eax, dword [esi + 0x4c]
mov cx, word [eax + 0xa]
neg cx
jmp 0x4041b0
mov ecx, dword [esi + 0x4c]
xor eax, eax
mov ax, word [ecx + 6]
mov edx, eax
movsx eax, word [0x47bc20]
sub eax, edx
cdq
sub eax, edx
sar eax, 1
mov word [esi + 0x59], ax
mov ax, word [0x47bc1c]
sub ax, word [ecx + 8]
mov word [esi + 0x5b], ax
movsx eax, word [esi + 0x5f]
cmp eax, 3
ja case.default.0x404209
jmp dword [eax*4 + 0x40438c]
mov cx, word [esi + 0x59]
mov dx, word [esi + 0x5b]
mov word [esi + 0x51], cx
mov word [esi + 0x53], dx
mov byte [esi + 0x50], bl
jmp case.default.0x404209
mov eax, dword [esi + 0x4c]
mov cx, word [eax + 6]
neg cx
mov word [esi + 0x51], cx
mov dx, word [0x47bc1c]
sub dx, word [eax + 8]
jmp 0x40427f
mov ax, word [0x47bc20]
mov ecx, dword [esi + 0x4c]
mov word [esi + 0x51], ax
mov dx, word [0x47bc1c]
sub dx, word [ecx + 8]
jmp 0x40427f
mov eax, dword [esi + 0x4c]
xor ecx, ecx
mov cx, word [eax + 6]
movsx eax, word [0x47bc20]
sub eax, ecx
cdq
sub eax, edx
sar eax, 1
mov word [esi + 0x51], ax
mov dx, word [0x47bc1c]
neg dx
mov ecx, esi
mov word [esi + 0x53], dx
call fcn.00403ff0
mov ax, word [esi + 0x5d]
mov word [esi + 0x7c], bx
cmp ax, bx
je 0x40437e
movsx ecx, ax
dec ecx
cmp ecx, 6
ja case.default.0x4042a8
jmp dword [ecx*4 + 0x40439c]
mov word [esi + 0x7c], 1
mov word [esi + 0x7e], 4
jmp case.default.0x4042a8
mov word [esi + 0x7c], 0xff
mov word [esi + 0x7e], 0xfffc
jmp case.default.0x4042a8
mov cx, word [esi + 0x5b]
mov ax, word [esi + 0x59]
mov word [esi + 0x53], cx
lea ecx, [esi + 0x63]
mov word [esi + 0x7c], 0xff
mov word [esi + 0x7e], 0xfffc
mov word [esi + 0x51], ax
mov word [esi + 0x80], bx
mov word [esi + 0x55], 0xa
mov word [esi + 0x57], bx
mov byte [esi + 0x50], 2
call fcn.0042a960
jmp case.default.0x4042a8
mov edx, 7
mov ecx, esi
sub edx, eax
push edx
call fcn.00404050
jmp case.default.0x4042a8
push 1
mov ecx, esi
call fcn.00404050
test eax, eax
je case.default.0x4042a8
mov eax, dword [esi + 0x70]
mov ecx, dword [esi + 0x9e]
lea eax, [eax + eax*2]
mov edx, dword [ecx + eax*4 + 8]
lea eax, [ecx + eax*4]
mov eax, dword [eax + 4]
lea ecx, [edx + eax - 3]
mov dword [esi + 0x78], ecx
jmp case.default.0x4042a8
push 4
mov ecx, esi
call fcn.00404050
test eax, eax
je case.default.0x4042a8
mov eax, dword [esi + 0x70]
lea edx, [eax + eax*2]
mov eax, dword [esi + 0x9e]
mov ecx, dword [eax + edx*4 + 8]
lea eax, [eax + edx*4]
mov edx, dword [eax + 4]
lea eax, [ecx + edx - 3]
mov dword [esi + 0x78], eax
lea ecx, [esi + 0x82]
call fcn.0042a960
pop edi
pop esi
mov eax, 1
pop ebx
ret 0xc