Function at 0x402f4a
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [eax + 0xc]
and dword [esi + 4], 0
or dword [esi], 0xffffffff
or dword [esi + 0x10], 0xffffffff
or dword [esi + 8], 0xffffffff
and dword [esi + 0x14], 0
mov dword [ebp - 4], ecx
call fcn.00402e5e
test al, al
jne 0x40311f
mov ecx, dword [ebp - 4]
call fcn.00402df4
test al, al
je 0x40305b
lea eax, [edi + 0x78]
test eax, eax
je 0x40301a
mov ecx, dword [eax + 0x70]
test ecx, ecx
je 0x40301a
cmp dword [eax + 0x74], 0
je 0x40301a
mov eax, dword [ebp + 8]
push 0
push ecx
push dword [eax + 8]
push edi
call dword [sym.imp.IMAGEHLP.dll_ImageRvaToVa]
mov ebx, eax
test ebx, ebx
je 0x40301a
cmp dword [ebx], 0x48
push str.CLI_header_has_unexpected_size
sete al
push eax
call fcn.00412a54
mov eax, dword [ebx]
and dword [ebp + 8], 0
add eax, dword [edi + 0xe8]
pop ecx
pop ecx
mov dword [esi + 0xc], eax
movzx ecx, word [edi + 0x14]
movzx edx, word [edi + 6]
test edx, edx
lea ecx, [ecx + edi + 0x18]
mov dword [ebp + 0xc], edx
jbe 0x40301a
mov edx, dword [ecx + 0x10]
mov edi, dword [ecx + 8]
cmp edi, edx
jae 0x402ffc
mov edx, edi
mov edi, dword [ecx + 0xc]
mov dword [ebp - 4], edx
cmp eax, edi
jb 0x40300c
add edx, edi
cmp eax, edx
jb 0x403024
inc dword [ebp + 8]
add ecx, 0x28
mov edx, dword [ebp + 8]
cmp edx, dword [ebp + 0xc]
jb 0x402ff0
push str.Error_finding_CLI_section_for_.NET_game__maybe_its_not_a_.NET_exe_
jmp 0x4030a5
mov edx, dword [ebp + 8]
mov dword [esi + 4], ecx
mov dword [esi], edx
mov edx, eax
sub edx, edi
push str.CLI_header_has_unexpected_size
mov dword [esi + 8], edx
mov ecx, dword [ecx + 0x14]
add ecx, edx
mov dword [esi + 0x10], ecx
mov ecx, dword [ebx + 8]
sub ecx, eax
mov dword [esi + 0x14], ecx
add ecx, edx
cmp ecx, dword [ebp - 4]
setb al
push eax
call fcn.00412a54
jmp 0x40311d
mov edx, dword [edi + 0x28]
and dword [ebp + 8], 0
mov dword [esi + 0xc], edx
movzx eax, word [edi + 0x14]
movzx ecx, word [edi + 6]
test ecx, ecx
lea eax, [eax + edi + 0x18]
mov dword [ebp + 0xc], ecx
jbe 0x4030a0
mov ecx, dword [eax + 0x10]
mov edi, dword [eax + 8]
cmp edi, ecx
jae 0x403084
mov ecx, edi
mov edi, dword [eax + 0xc]
cmp edx, edi
jb 0x403092
lea ebx, [edi + ecx]
cmp edx, ebx
jb 0x4030b7
inc dword [ebp + 8]
add eax, 0x28
mov ecx, dword [ebp + 8]
cmp ecx, dword [ebp + 0xc]
jb 0x403078
push str.Error_calculating_file_offset__what_type_of_PE_file_is_this___
push 0
call fcn.00412a54
pop ecx
xor al, al
pop ecx
pop edi
pop esi
pop ebx
leave
ret 8
mov ebx, dword [ebp + 8]
sub edx, edi
mov dword [esi], ebx
mov dword [esi + 4], eax
mov dword [esi + 8], edx
mov eax, dword [eax + 0x14]
sub ecx, edx
add eax, edx
mov ebx, ecx
mov ecx, dword [ebp - 4]
mov dword [esi + 0x10], eax
call fcn.00402d8a
test al, al
je 0x4030f9
mov edi, 0x80
push str.The_Code_Section_is_not_long_enough_to_encode.
cmp ebx, edi
sbb al, al
inc al
push eax
call fcn.00412a54
pop ecx
mov dword [esi + 0x14], edi
pop ecx
jmp 0x4030fc
mov dword [esi + 0x14], ebx
push str.The_Code_Section_is_not_long_enough_to_encode_with_some_initial_skip_bytes
push 5
pop edi
cmp dword [esi + 0x14], edi
seta al
push eax
call fcn.00412a54
add dword [esi + 0x14], 0xfffffffb
add dword [esi + 8], edi
add dword [esi + 0x10], edi
add dword [esi + 0xc], edi
pop ecx
pop ecx
mov al, 1
jmp 0x4030b0