Function at 0x40499f
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0x18]
push ebx
sub esp, 0xcc
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x8c]
mov dword [ebp - 0x74], 0x490450
mov dword [ebp - 0x70], 0x491078
mov dword [ebp - 0x68], 0x404d67
mov dword [ebp - 0x64], esp
mov dword [esp], eax
call fcn.0041ba90
cmp dword [ebp + 0xc], 0x3f
jbe 0x4049f8
mov eax, dword [ebp + 8]
cmp word [eax], 0x5a4d
jne 0x4049f8
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x3c]
lea edx, [eax + 0xf8]
cmp dword [ebp + 0xc], edx
jae 0x404a07
mov dword [ebp - 0x90], 0
jmp 0x405462
add eax, dword [ebp + 8]
cmp dword [eax], 0x4550
mov dword [ebp - 0x94], eax
jne 0x4049f8
mov eax, dword [ebp - 0x94]
cmp word [eax + 4], 0x14c
jne 0x4049f8
mov ebx, dword [eax + 0x38]
test bl, 1
jne 0x4049f8
movzx eax, word [eax + 0x14]
mov esi, dword [ebp - 0x94]
xor ecx, ecx
mov dword [ebp - 0x90], 0
lea edx, [esi + eax + 0x18]
movzx esi, word [esi + 6]
cmp ecx, esi
jae 0x404a79
mov eax, dword [edx + 0xc]
lea edi, [ebx + eax]
add eax, dword [edx + 0x10]
cmp dword [edx + 0x10], 0
cmove eax, edi
cmp dword [ebp - 0x90], eax
cmovae eax, dword [ebp - 0x90]
inc ecx
add edx, 0x28
mov dword [ebp - 0x90], eax
jmp 0x404a4c
mov eax, dword [0x4a50a8]
mov eax, dword [eax]
mov dword [esp], eax
mov dword [ebp - 0x88], 0xffffffff
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push edx
mov dword [ebp - 0x98], eax
lea eax, [ebp - 0x3c]
mov dword [esp], eax
call fcn.00402fe8
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x98]
mov dword [esp], eax
mov dword [ebp - 0x88], 1
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ecx, [ebp - 0x3c]
push esi
push esi
mov dword [ebp - 0x9c], eax
call fcn.00464b10
lea eax, [ebp - 0x3c]
mov dword [esp], eax
mov dword [ebp - 0x88], 0xffffffff
call dword [ebp - 0x9c]
push edi
mov ebx, dword [ebp - 0x94]
mov edx, dword [ebp - 0x38]
mov ecx, dword [ebx + 0x50]
mov ebx, dword [ebp - 0x90]
mov eax, edx
neg eax
add ecx, edx
lea edx, [ebx + edx - 1]
dec ecx
and ecx, eax
and eax, edx
cmp ecx, eax
mov dword [ebp - 0xa0], ecx
jne 0x4049f8
mov eax, dword [ebp + 0x24]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x3000
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0xa0]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x94]
mov eax, dword [eax + 0x34]
mov dword [esp], eax
call dword [ebp + 0x10]
test eax, eax
mov dword [ebp - 0x9c], eax
jne 0x404b8e
mov eax, dword [ebp + 0x24]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x3000
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0xa0]
mov dword [esp], 0
mov dword [esp + 4], eax
call dword [ebp + 0x10]
test eax, eax
mov dword [ebp - 0x9c], eax
je 0x4049f8
lea eax, [ebp - 0x50]
mov dword [esp], eax
mov dword [ebp - 0x88], 0xffffffff
call fcn.00402a65
mov eax, dword [ebp - 0x50]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x98]
mov dword [esp], eax
mov dword [ebp - 0x88], 2
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ecx, [ebp - 0x50]
push ebx
push ebx
mov dword [ebp - 0x90], eax
call fcn.00464b10
lea eax, [ebp - 0x50]
mov dword [esp], eax
mov dword [ebp - 0x88], 0xffffffff
call fcn.004021d8
mov eax, dword [ebp - 0x50]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x98]
mov dword [esp], eax
mov dword [ebp - 0x88], 3
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push ecx
push ecx
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x98], eax
call fcn.00464b10
mov dword [ebp - 0x88], 0xffffffff
mov eax, dword [ebp - 0x98]
call eax
mov dword [esp + 8], 0x40
mov dword [esp + 4], 8
mov dword [esp], eax
call dword [ebp - 0x90]
sub esp, 0xc
test eax, eax
mov dword [ebp - 0x90], eax
jne 0x404c78
mov eax, dword [ebp + 0x24]
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x9c]
mov dword [esp], eax
call dword [ebp + 0x14]
jmp 0x4049f8
mov eax, dword [ebp - 0x90]
mov ebx, dword [ebp - 0x9c]
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 0x24]
mov dword [eax + 4], ebx
mov eax, dword [ebp - 0x94]
mov ebx, dword [ebp - 0x90]
mov ax, word [eax + 0x16]
mov dword [ebx + 0x1c], esi
mov esi, dword [ebp - 0x90]
mov word [ebp - 0x98], ax
shr ax, 0xd
and eax, 1
mov dword [ebx + 0x14], eax
mov eax, ebx
mov ebx, dword [ebp + 0x14]
mov dword [eax + 0x20], ebx
mov eax, dword [ebp + 0x18]
mov dword [esi + 0x34], edi
mov dword [esi + 0x24], eax
mov eax, dword [ebp + 0x1c]
mov dword [esi + 0x28], eax
mov eax, dword [ebp + 0x20]
mov dword [esi + 0x2c], eax
mov eax, dword [ebp - 0x38]
mov dword [esi + 0x3c], eax
mov eax, dword [ebp - 0x94]
mov eax, dword [eax + 0x54]
cmp dword [ebp + 0xc], eax
jb 0x404d4a
jmp 0x404dad
mov eax, dword [ebp - 0x94]
mov eax, dword [eax + 0x38]
test eax, eax
mov dword [ebp - 0xa4], eax
jg 0x404e2b
inc dword [ebp - 0xa8]
add dword [ebp - 0x98], 0x28
mov eax, dword [ebp - 0x90]
mov edx, dword [eax]
movzx eax, word [edx + 6]
cmp dword [ebp - 0xa8], eax
jge 0x404ea4
mov eax, dword [ebp - 0x98]
mov eax, dword [eax + 0x10]
test eax, eax
je 0x404ced
mov edi, dword [ebp - 0x98]
mov edx, dword [edi + 0x14]
add edx, eax
cmp dword [ebp + 0xc], edx
jae 0x40525b
mov eax, dword [ebp - 0x90]
mov dword [esp], eax
mov dword [ebp - 0x88], 0xffffffff
call fcn.00402031
jmp 0x4049f8
mov ebx, dword [ebp + 0x24]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x1000
mov dword [esp + 4], eax
mov dword [esp + 0x10], ebx
mov eax, dword [ebp - 0x9c]
mov dword [esp], eax
mov dword [ebp - 0x88], 0xffffffff
call dword [ebp + 0x10]
mov esi, dword [ebp - 0x94]
mov edi, eax
mov ebx, dword [ebp - 0x90]
mov dword [ebp - 0xa8], 0
mov ecx, dword [esi + 0x54]
mov esi, dword [ebp + 8]
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 8]
mov esi, dword [ebp - 0x9c]
add eax, dword [edi + 0x3c]
movzx edx, word [eax + 0x14]
mov dword [ebx], eax
mov ebx, dword [ebx + 4]
mov dword [eax + 0x34], esi
lea eax, [eax + edx + 0x18]
mov dword [ebp - 0xa0], ebx
mov dword [ebp - 0x98], eax
jmp 0x404d11
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x1000
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0xa4]
mov dword [esp + 4], eax
mov esi, dword [ebp - 0x98]
mov eax, dword [ebp - 0xa0]
add eax, dword [esi + 0xc]
mov dword [esp], eax
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x88], 0xffffffff
call eax
test eax, eax
je 0x404d4a
mov eax, dword [ebp - 0x98]
mov edx, dword [ebp - 0xa0]
mov ecx, dword [ebp - 0xa4]
add edx, dword [eax + 0xc]
mov dword [eax + 8], edx
mov edi, edx
xor eax, eax
rep stosb byte es:[edi], al
jmp 0x404d04
mov edi, dword [ebp - 0x94]
mov eax, dword [edx + 0x34]
sub eax, dword [edi + 0x34]
mov dword [ebp - 0x98], eax
mov eax, dword [ebp - 0x90]
je 0x404f25
mov esi, dword [eax + 4]
xor eax, eax
cmp dword [edx + 0xa4], 0
je 0x404f1a
mov ecx, dword [edx + 0xa0]
add ecx, esi
mov eax, dword [ecx]
test eax, eax
mov dword [ebp - 0x94], eax
je 0x404f18
xor ebx, ebx
mov edi, dword [ecx + 4]
lea eax, [edi - 8]
shr eax, 1
cmp ebx, eax
jae 0x404f14
movzx edi, word [ecx + ebx*2 + 8]
mov eax, edi
sar edi, 0xc
cmp edi, 3
jne 0x404f11
and eax, 0xfff
add eax, dword [ebp - 0x94]
mov edi, dword [ebp - 0x98]
add dword [esi + eax], edi
inc ebx
jmp 0x404ee2
add ecx, edi
jmp 0x404ed4
mov al, 1
mov ebx, dword [ebp - 0x90]
mov dword [ebx + 0x18], eax
jmp 0x404f2c
mov dword [eax + 0x18], 1
mov eax, dword [ebp - 0x90]
cmp dword [edx + 0x84], 0
mov eax, dword [eax + 4]
mov dword [ebp - 0x94], eax
jne 0x404f7b
mov eax, dword [ebp - 0x90]
mov esi, dword [ebp - 0x90]
mov eax, dword [eax]
mov ebx, dword [esi + 0x3c]
movzx edx, word [eax + 0x14]
mov ecx, ebx
mov dword [ebp - 0x94], ebx
neg ecx
lea eax, [eax + edx + 0x18]
mov edx, dword [eax + 8]
mov dword [ebp - 0x50], edx
and edx, ecx
mov dword [ebp - 0x4c], edx
mov edx, dword [eax + 0x10]
test edx, edx
je 0x404fd5
jmp 0x404ffa
mov eax, dword [ebp - 0x94]
add eax, dword [edx + 0x80]
mov dword [ebp - 0xa4], eax
mov eax, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
mov dword [ebp - 0xac], eax
mov dword [esp + 4], 0x14
mov eax, dword [ebp - 0xa4]
mov dword [esp], eax
mov dword [ebp - 0x88], 0xffffffff
call dword [ebp - 0xac]
test eax, eax
push edx
push edx
jne 0x404f44
mov eax, dword [ebp - 0xa4]
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x4052cf
jmp 0x404f44
mov ecx, dword [eax + 0x24]
test cl, 0x40
je 0x404fea
mov esi, dword [ebp - 0x90]
mov edx, dword [esi]
mov edx, dword [edx + 0x20]
jmp 0x404ffa
and cl, 0x80
je 0x404ffa
mov edi, dword [ebp - 0x90]
mov edx, dword [edi]
mov edx, dword [edx + 0x24]
mov dword [ebp - 0x48], edx
mov edx, dword [eax + 0x24]
add eax, 0x28
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x94], eax
mov dword [ebp - 0xa8], 1
mov dword [ebp - 0x44], edx
mov eax, dword [ebp - 0x90]
mov eax, dword [eax]
movzx edx, word [eax + 6]
cmp dword [ebp - 0xa8], edx
jge 0x405137
mov ebx, dword [ebp - 0x94]
mov edi, dword [ebp - 0x90]
mov esi, dword [ebx + 8]
mov ebx, dword [edi + 0x3c]
mov edi, dword [ebp - 0x94]
mov edx, ebx
mov dword [ebp - 0xa0], esi
mov ebx, dword [edi + 0x10]
neg edx
and edx, esi
mov dword [ebp - 0xa4], edx
test ebx, ebx
mov dword [ebp - 0x98], ebx
jne 0x405087
mov edx, dword [edi + 0x24]
test dl, 0x40
je 0x405079
mov eax, dword [eax + 0x20]
jmp 0x405081
and dl, 0x80
je 0x405087
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x98], eax
mov eax, dword [ebp - 0xa4]
cmp dword [ebp - 0x4c], eax
je 0x4050a0
mov eax, dword [ebp - 0x48]
add eax, dword [ebp - 0x50]
cmp eax, dword [ebp - 0xa4]
jbe 0x4050de
mov eax, dword [ebp - 0x94]
mov eax, dword [eax + 0x24]
test eax, 0x2000000
je 0x4050bb
mov edx, dword [ebp - 0x44]
test edx, 0x2000000
jne 0x4050c5
or eax, dword [ebp - 0x44]
and eax, 0xfdffffff
jmp 0x4050c7
or eax, edx
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0xa0]
sub eax, dword [ebp - 0x50]
add eax, dword [ebp - 0x98]
mov dword [ebp - 0x48], eax
jmp 0x405125
mov eax, dword [ebp - 0x90]
lea edx, [ebp - 0x50]
mov dword [ebp - 0x88], 0xffffffff
call fcn.004047f2
test eax, eax
je 0x404d4a
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x94]
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x44], eax
inc dword [ebp - 0xa8]
add dword [ebp - 0x94], 0x28
jmp 0x40501d
mov eax, dword [ebp - 0x90]
lea edx, [ebp - 0x50]
mov dword [ebp - 0x88], 0xffffffff
mov dword [ebp - 0x40], 1
call fcn.004047f2
test eax, eax
je 0x404d4a
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 4]
mov dword [ebp - 0x98], eax
mov eax, dword [ebp - 0x90]
mov eax, dword [eax]
mov eax, dword [eax + 0xc0]
test eax, eax
jne 0x405193
mov eax, dword [ebp - 0x90]
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
test eax, eax
jne 0x4051e4
jmp 0x405249
mov ebx, dword [ebp - 0x98]
mov eax, dword [ebx + eax + 0xc]
test eax, eax
mov dword [ebp - 0x94], eax
je 0x40517f
mov eax, dword [ebp - 0x94]
mov eax, dword [eax]
test eax, eax
je 0x40517f
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov esi, dword [ebp - 0x98]
mov dword [esp], esi
mov dword [ebp - 0x88], 0xffffffff
call eax
add dword [ebp - 0x94], 4
sub esp, 0xc
jmp 0x4051a7
mov edi, dword [ebp - 0x90]
mov ebx, dword [ebp - 0x9c]
cmp dword [edi + 0x14], 0
lea eax, [ebx + eax]
je 0x40523b
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov esi, dword [ebp - 0x9c]
mov dword [esp], esi
mov dword [ebp - 0x88], 0xffffffff
call eax
sub esp, 0xc
test eax, eax
je 0x404d4a
mov eax, dword [ebp - 0x90]
mov dword [eax + 0x10], 1
jmp 0x405462
mov edi, dword [ebp - 0x90]
mov dword [edi + 0x38], eax
jmp 0x405462
mov eax, dword [ebp - 0x90]
mov dword [eax + 0x38], 0
jmp 0x405462
mov esi, dword [ebp - 0x90]
mov edx, dword [esi + 0x34]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x1000
mov dword [esp + 4], eax
mov dword [esp + 0x10], edx
mov edi, dword [ebp - 0x98]
mov eax, dword [ebp - 0xa0]
add eax, dword [edi + 0xc]
mov dword [esp], eax
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x88], 0xffffffff
call eax
test eax, eax
je 0x404d4a
mov ebx, dword [ebp - 0x98]
mov eax, dword [ebp - 0xa0]
mov esi, dword [ebp + 8]
add eax, dword [ebx + 0xc]
add esi, dword [ebx + 0x14]
mov ecx, dword [ebx + 0x10]
mov edi, eax
rep movsb byte es:[edi], byte [esi]
mov dword [ebx + 8], eax
jmp 0x404d04
mov ecx, dword [ebp - 0x90]
mov edx, dword [ecx + 0x34]
mov dword [esp + 4], edx
add eax, dword [ebp - 0x94]
mov dword [esp], eax
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x88], 0xffffffff
call eax
test eax, eax
mov dword [ebp - 0x98], eax
je 0x404d4a
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0xc]
lea eax, [eax*4 + 4]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 8]
mov dword [esp], eax
call sub.msvcrt.dll_realloc
test eax, eax
je 0x405432
mov esi, dword [ebp - 0x90]
mov edi, dword [ebp - 0x98]
mov edx, dword [esi + 0xc]
mov dword [esi + 8], eax
lea ecx, [edx + 1]
mov dword [esi + 0xc], ecx
mov dword [eax + edx*4], edi
mov eax, dword [ebp - 0xa4]
mov edx, dword [eax]
mov eax, dword [eax + 0x10]
test edx, edx
je 0x405379
add edx, dword [ebp - 0x94]
add eax, dword [ebp - 0x94]
mov dword [ebp - 0xa8], edx
mov dword [ebp - 0xa0], eax
jmp 0x4053e2
add eax, dword [ebp - 0x94]
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0xa8], eax
jmp 0x4053e2
mov ebx, dword [ebp - 0x90]
mov edx, dword [ebx + 0x34]
mov dword [esp + 8], edx
jns 0x4053f0
movzx eax, ax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x98]
mov dword [esp], eax
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x88], 0xffffffff
call eax
mov esi, dword [ebp - 0xa0]
mov dword [esi], eax
mov eax, dword [ebp - 0xa0]
cmp dword [eax], 0
je 0x405432
add dword [ebp - 0xa8], 4
add dword [ebp - 0xa0], 4
mov eax, dword [ebp - 0xa8]
mov eax, dword [eax]
test eax, eax
jne 0x40538d
jmp 0x405426
mov edi, dword [ebp - 0x94]
lea eax, [edi + eax + 2]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x98]
mov dword [esp], eax
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x88], 0xffffffff
call eax
mov ebx, dword [ebp - 0xa0]
mov dword [ebx], eax
jmp 0x4053c9
add dword [ebp - 0xa4], 0x14
jmp 0x404f98
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0x34]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x98]
mov dword [esp], eax
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0x2c]
mov dword [ebp - 0x88], 0xffffffff
call eax
jmp 0x404d4a
lea eax, [ebp - 0x8c]
mov dword [esp], eax
call fcn.0041bc00
mov eax, dword [ebp - 0x90]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret