Function at 0x402930
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x5f8800]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, edx
mov eax, dword [ebx + 0x10]
push edi
mov esi, ecx
xor edi, edi
push eax
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x3c], edi
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [ebp - 0x40], eax
dec eax
cmp eax, 0xfe
ja 0x402cc2
mov ecx, dword [esi + 0x28]
mov eax, dword [esi + 0x24]
lea edx, [ecx + ecx*2]
shl edx, 7
add edx, eax
cmp eax, edx
jae 0x402cc2
add eax, 0x24
mov ecx, dword [eax]
test ecx, ecx
jne 0x402993
test edi, edi
jne 0x4029bf
lea edi, [eax - 0x24]
jmp 0x4029bf
cmp ecx, 1
je 0x4029bf
mov ecx, dword [eax - 0xc]
cmp ecx, dword [esi + 0x286c]
jne 0x4029bf
mov cx, word [eax - 8]
cmp cx, word [esi + 0x2870]
jne 0x4029bc
mov ecx, dword [eax - 0x14]
cmp ecx, dword [ebx + 0x28]
je 0x402cc2
inc dword [ebp - 0x3c]
add eax, 0x180
lea ecx, [eax - 0x24]
cmp ecx, edx
jb 0x402984
test edi, edi
je 0x402cc2
mov edx, dword [ebp - 0x3c]
cmp edx, dword [esi + 0x2898]
jae 0x402cc2
mov esi, dword [esi + 0x2c]
mov eax, dword [ebp - 0x40]
cmp eax, esi
jbe 0x4029f1
mov dword [ebp - 0x40], esi
mov eax, esi
mov esi, eax
shl esi, 4
sub esi, eax
add esi, esi
add esi, esi
push esi
mov dword [ebp - 0x3c], esi
call fcn.00405bd0
add esp, 4
mov dword [edi + 0x28], eax
test eax, eax
je 0x402cc2
mov eax, dword [ebp - 0x40]
mov dword [edi + 0x2c], eax
mov eax, dword [ebp - 0x44]
mov dword [edi + 0x24], 2
mov ecx, dword [ebx + 0x28]
mov dword [edi + 0x10], ecx
mov edx, dword [eax + 0x286c]
mov dword [edi + 0x18], edx
mov eax, dword [eax + 0x2870]
mov dword [edi + 0x1c], eax
movzx ecx, word [ebx + 4]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [edi + 0xc], ax
mov edx, dword [ebx + 0x14]
push edx
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [edi + 0x30], eax
mov eax, dword [ebx + 0x18]
push eax
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [edi + 0x34], eax
mov ecx, dword [ebx + 0x1c]
push ecx
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [edi + 0x84], eax
mov edx, dword [ebx + 0x20]
push edx
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [edi + 0x7c], eax
mov eax, dword [ebx + 0x24]
push eax
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [edi + 0x80], eax
mov ecx, dword [ebx + 0x2c]
push ecx
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [edi + 0x178], eax
mov al, byte [ebx + 6]
cmp al, 0xff
jne 0x402aab
mov al, byte [edi + 0x14]
inc al
and al, 3
mov byte [ebp - 0x36], al
cmp al, byte [edi + 0x14]
jne 0x402abe
inc al
and al, 3
mov byte [ebp - 0x36], al
mov byte [edi + 0x14], al
mov al, byte [ebx + 7]
cmp al, 0xff
jne 0x402acb
mov al, byte [edi + 0x15]
inc al
and al, 3
mov byte [ebp - 0x35], al
cmp al, byte [edi + 0x15]
jne 0x402ade
inc al
and al, 3
mov byte [ebp - 0x35], al
mov byte [edi + 0x15], al
mov eax, dword [edi + 0x28]
lea edx, [eax + esi]
cmp eax, edx
jae 0x402b3c
lea esi, [eax + 0x26]
mov edi, edi
lea ecx, [esi + 6]
xor eax, eax
xor edx, edx
push ecx
mov dword [esi - 0x26], eax
mov dword [esi], edx
call fcn.00405c10
lea edx, [esi + 0xe]
push edx
call fcn.00405c10
xor eax, eax
mov word [esi - 0x22], ax
mov dword [esi - 0x20], eax
mov dword [esi - 0x1c], eax
mov dword [esi - 0x18], eax
mov dword [esi - 0x14], eax
mov dword [esi - 0x10], eax
mov dword [esi - 0xc], eax
mov dword [esi - 8], eax
mov dword [esi - 4], eax
mov ecx, dword [edi + 0x28]
add ecx, dword [ebp - 0x3c]
add esi, 0x3c
lea edx, [esi - 0x26]
add esp, 8
cmp edx, ecx
jb 0x402af0
mov eax, dword [ebx + 8]
push eax
call dword [sym.imp.WS2_32.dll_ntohl]
cmp eax, 0x240
jae 0x402b54
mov eax, 0x240
jmp 0x402b60
cmp eax, 0x1000
jbe 0x402b60
mov eax, 0x1000
mov edx, dword [ebp - 0x44]
mov dword [edi + 0xb0], eax
mov eax, dword [edx + 0x10]
test eax, eax
jne 0x402b85
cmp dword [edi + 0x30], eax
jne 0x402b81
mov dword [edi + 0xb4], 0x10000
jmp 0x402ba7
test eax, eax
je 0x402b92
mov ecx, dword [edi + 0x30]
test ecx, ecx
je 0x402b92
cmp eax, ecx
jb 0x402b9b
jmp 0x402b99
mov ecx, dword [edi + 0x30]
cmp eax, ecx
ja 0x402b9b
mov eax, ecx
shr eax, 0x10
shl eax, 0xc
mov dword [edi + 0xb4], eax
mov eax, dword [edi + 0xb4]
cmp eax, 0x1000
jae 0x402bc0
mov dword [edi + 0xb4], 0x1000
jmp 0x402bd1
cmp eax, 0x10000
jbe 0x402bd1
mov dword [edi + 0xb4], 0x10000
mov ebx, dword [edx + 0xc]
test ebx, ebx
jne 0x402bdf
mov ebx, 0x10000
jmp 0x402be5
shr ebx, 0x10
shl ebx, 0xc
mov esi, dword [ebp - 0x48]
mov ecx, dword [esi + 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_ntohl]
cmp ebx, eax
jbe 0x402c02
mov edx, dword [esi + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_ntohl]
mov ebx, eax
cmp ebx, 0x1000
jae 0x402c11
mov ebx, 0x1000
jmp 0x402c1e
cmp ebx, 0x10000
jbe 0x402c1e
mov ebx, 0x10000
mov word [ebp - 0x34], 0xff83
movzx eax, word [edi + 0xe]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov cl, byte [ebp - 0x36]
mov dl, byte [ebp - 0x35]
mov esi, dword [sym.imp.WS2_32.dll_htonl]
mov word [ebp - 0x30], ax
mov byte [ebp - 0x2e], cl
mov byte [ebp - 0x2d], dl
mov eax, dword [edi + 0xb0]
push eax
call esi
push ebx
mov dword [ebp - 0x2c], eax
call esi
mov ecx, dword [ebp - 0x40]
push ecx
mov dword [ebp - 0x28], eax
call esi
mov ebx, dword [ebp - 0x44]
mov edx, dword [ebx + 0xc]
push edx
mov dword [ebp - 0x24], eax
call esi
mov dword [ebp - 0x20], eax
mov eax, dword [ebx + 0x10]
push eax
call esi
mov dword [ebp - 0x1c], eax
mov ecx, dword [edi + 0x84]
push ecx
call esi
mov dword [ebp - 0x18], eax
mov edx, dword [edi + 0x7c]
push edx
call esi
mov dword [ebp - 0x14], eax
mov eax, dword [edi + 0x80]
push eax
call esi
push 0
push 0
push 0
lea edx, [ebp - 0x34]
mov dword [ebp - 0x10], eax
mov ecx, dword [edi + 0x10]
push edx
push edi
mov dword [ebp - 0xc], ecx
call fcn.00405160
add esp, 0x14
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005aa550
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.005aa550
mov esp, ebp
pop ebp
ret