Function at 0x408000
Capabilities:
Enumerate pe sections
Read file on windows

Disassembly:
sub esp, 0xa8
lea eax, [esp + 0x20]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_OpenFile]
push ebp
push esi
mov esi, ecx
push edi
push 0
push eax
lea ecx, [esi + 0x1c]
push ecx
call ebx
mov edi, eax
lea edx, [esp + 0x30]
push 0
lea eax, [esi + 0x9c]
push edx
push eax
call ebx
cmp edi, 0xffffffff
mov ebx, eax
jne 0x408059
push 0
push str.Open_NBS
push str.Cannot_open_NBS_File.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xa8
ret
cmp ebx, 0xffffffff
jne 0x40806f
push 0
push 0x413610
push 0x4135f4
jmp 0x408436
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 2
push 0
push 0
push edi
call ebp
push 0
push 0
push 0
push edi
mov dword [esp + 0x2c], eax
call ebp
mov ecx, dword [0x4135f0]
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [esp + 0x14]
push 0
push edx
lea eax, [esp + 0x28]
push 3
push eax
push edi
mov dword [esp + 0x34], ecx
call ebp
mov dword [esp + 0x18], 0x4135ec
lea eax, [esp + 0x20]
mov cl, byte [eax]
mov edx, dword [esp + 0x18]
mov byte [esp + 0x13], cl
cmp cl, byte [edx]
jne 0x4080e8
test cl, cl
je 0x4080e4
mov cl, byte [eax + 1]
mov byte [esp + 0x13], cl
cmp cl, byte [edx + 1]
jne 0x4080e8
add eax, 2
add edx, 2
test cl, cl
mov dword [esp + 0x18], edx
jne 0x4080b8
xor eax, eax
jmp 0x4080ed
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
push 0
je 0x40811e
push str.Load_TBS
push str.This_is_not_a_TBS_file.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
push ebx
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xa8
ret
lea eax, [esp + 0x18]
push eax
push 2
push esi
push edi
call ebp
xor ecx, ecx
mov cx, word [esi]
shl ecx, 2
push ecx
call fcn.00408ed9
xor ecx, ecx
add esp, 4
mov cx, word [esi]
lea edx, [esp + 0x14]
push 0
push edx
shl ecx, 2
push ecx
push eax
push edi
mov dword [esi + 4], eax
call ebp
mov eax, dword [esp + 0x1c]
xor edx, edx
mov dx, word [esi]
mov ecx, 0xfffffffb
shl edx, 2
sub ecx, edx
add eax, ecx
push eax
mov dword [esp + 0x20], eax
call fcn.00408ed9
add esp, 4
mov dword [esi + 0x120], eax
test eax, eax
push 0
je 0x40842c
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x18]
push edx
push ecx
push eax
push edi
call ebp
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea edx, [esp + 0x14]
push 0
push edx
lea eax, [esi + 0x126]
push 2
push eax
push ebx
call ebp
lea ecx, [esp + 0x14]
push 0
lea edi, [esi + 0x124]
push ecx
push 2
push edi
push ebx
call ebp
xor eax, eax
mov ax, word [edi]
lea edx, [eax + eax*2]
shl edx, 2
push edx
call fcn.00408ed9
add esp, 4
lea ecx, [esp + 0x14]
mov dword [esi + 0x14], eax
push 0
push ecx
xor ecx, ecx
mov cx, word [edi]
lea edx, [ecx + ecx*2]
shl edx, 2
push edx
push eax
push ebx
call ebp
mov edx, dword [esi + 0x14]
xor eax, eax
mov ax, word [edi]
lea ecx, [eax + eax*2]
xor eax, eax
mov ax, word [edx + ecx*4 - 0xa]
lea eax, [eax + eax*4]
shl eax, 1
push eax
call fcn.00408ed9
add esp, 4
lea ecx, [esp + 0x14]
mov dword [esi + 0x18], eax
push 0
push ecx
xor ecx, ecx
mov cx, word [edi]
mov edi, dword [esi + 0x14]
lea edx, [ecx + ecx*2]
xor ecx, ecx
mov cx, word [edi + edx*4 - 0xa]
lea ecx, [ecx + ecx*4]
shl ecx, 1
push ecx
push eax
push ebx
call ebp
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
mov dx, word [esi]
shl edx, 3
push edx
call fcn.00408ed9
xor ecx, ecx
add esp, 4
cmp word [esi], cx
mov dword [esi + 0x12c], eax
mov dword [esp + 0x24], ecx
jbe 0x408396
xor edi, edi
mov eax, dword [esi + 0x12c]
mov word [edi + eax], 0x7530
mov edx, dword [esi + 0x12c]
xor eax, eax
mov word [edi + edx + 2], 0x7530
mov edx, dword [esi + 0x12c]
mov word [edi + edx + 4], ax
mov edx, dword [esi + 0x12c]
mov word [edi + edx + 6], ax
mov eax, dword [esi + 4]
mov ebx, dword [eax + ecx*4]
mov eax, dword [esi + 0x120]
add ebx, eax
mov eax, 4
mov dword [esp + 0x1c], eax
mov edx, dword [ebx]
cmp edx, eax
mov dword [esp + 0x2c], edx
jbe 0x408381
jmp 0x4082ca
mov eax, dword [esp + 0x1c]
xor edx, edx
xor ebp, ebp
mov dx, word [ebx + eax + 4]
mov bp, word [eax + ebx]
mov dword [esp + 0x28], edx
mov edx, dword [esi + 0x12c]
xor ecx, ecx
mov cx, word [ebx + eax + 2]
lea eax, [edi + edx]
xor edx, edx
mov dx, word [eax]
cmp ecx, edx
jge 0x4082f7
mov word [eax], cx
mov eax, dword [esi + 0x12c]
xor edx, edx
add eax, edi
mov dx, word [eax + 2]
cmp ebp, edx
jge 0x40830d
mov word [eax + 2], bp
mov eax, dword [esi + 0x12c]
lea edx, [edi + eax]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x18], edx
cdq
sub eax, edx
mov edx, dword [esp + 0x18]
sar eax, 1
mov dword [esp + 0x20], eax
xor eax, eax
mov ax, word [edx + 4]
mov edx, dword [esp + 0x20]
add edx, ecx
cmp edx, eax
jle 0x408349
mov eax, dword [esp + 0x20]
add eax, ecx
mov ecx, dword [esp + 0x18]
mov word [ecx + 4], ax
mov edx, dword [esi + 0x12c]
xor ecx, ecx
mov cx, word [edi + edx + 6]
lea eax, [edi + edx]
cmp ebp, ecx
jle 0x408361
mov word [eax + 6], bp
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
lea eax, [edx + eax + 6]
cmp eax, ecx
mov dword [esp + 0x1c], eax
jb 0x4082c6
mov ecx, dword [esp + 0x24]
xor edx, edx
inc ecx
mov dx, word [esi]
add edi, 8
cmp ecx, edx
mov dword [esp + 0x24], ecx
jl 0x40826e
mov al, byte [esi + 0x10]
test al, al
jne 0x40841c
xor eax, eax
cmp word [esi], ax
mov dword [esp + 0x24], eax
jbe 0x40841c
mov ecx, dword [esi + 4]
mov ebp, dword [esi + 0x120]
mov edi, 4
mov ecx, dword [ecx + eax*4]
add ecx, ebp
mov dword [esp + 0x28], ecx
mov edx, dword [ecx]
cmp edx, edi
mov dword [esp + 0x2c], edx
jbe 0x40840e
xor ebx, ebx
mov bx, word [ecx + edi + 4]
mov eax, ebx
sar eax, 1
test eax, eax
jle 0x408402
lea ecx, [edi + ecx + 6]
mov edx, eax
mov ax, word [ecx]
add ecx, 2
mov ebp, eax
and eax, 0x1f
shr ebp, 1
and ebp, 0x7fe0
add ebp, eax
dec edx
mov word [ecx - 2], bp
jne 0x4083de
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
lea edi, [edi + ebx + 6]
cmp edi, edx
jb 0x4083c9
mov eax, dword [esp + 0x24]
xor edx, edx
inc eax
mov dx, word [esi]
mov dword [esp + 0x24], eax
cmp eax, edx
jl 0x4083a8
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xa8
ret
push str.Open_NBS
push str.Not_enough_memory_to_open_NBS_File.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xa8
ret