Function at 0x40b410
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x20], edx
push edi
xor edi, edi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x14], edi
test esi, esi
je 0x40b4a3
cmp esi, dword [0x4666fc]
je 0x40b4a3
mov eax, 0x5a4d
cmp word [esi], ax
jne 0x40b4a3
mov ecx, dword [esi + 0x3c]
cmp dword [ecx + esi], 0x4550
jne 0x40b4a3
mov eax, dword [ecx + esi + 0x80]
mov ecx, dword [ecx + esi + 0x84]
add eax, esi
add ecx, eax
mov dword [ebp - 0x28], ecx
test eax, eax
je 0x40b4a3
cmp eax, ecx
je 0x40b622
lea ecx, [eax + 0xc]
mov dword [ebp - 8], ecx
cmp dword [ecx - 8], 0
mov eax, dword [ecx]
jne 0x40b486
test eax, eax
je 0x40b61f
add eax, esi
jmp 0x40b490
test eax, eax
je 0x40b48e
add eax, esi
jmp 0x40b490
xor eax, eax
mov edx, dword [ecx - 0xc]
mov ebx, dword [ecx + 4]
mov dword [ebp - 0x10], eax
test edx, edx
jne 0x40b4ac
mov edx, ebx
test ebx, ebx
jne 0x40b4b0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp edx, ebx
jne 0x40b4b7
mov dword [ebp - 0x14], 1
add edx, esi
add ebx, esi
mov dword [ebp - 4], edx
test edx, edx
je 0x40b60a
cmp dword [edx], 0
je 0x40b604
mov eax, dword [ebp - 0x20]
cmp dword [eax + 8], 0
je 0x40b5f3
lea edi, [eax + 4]
nop
mov ecx, dword [edi + 4]
mov eax, dword [edi]
mov esi, dword [edi - 4]
mov dword [ebp - 0x24], ecx
mov ecx, dword [edi + 8]
mov dword [ebp - 0x18], ecx
test eax, eax
je 0x40b512
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x40b512
push ecx
push eax
call dword [0x45b1f0]
add esp, 8
test eax, eax
jne 0x40b5e3
mov edx, dword [ebp - 4]
test esi, esi
je 0x40b589
cmp dword [ebp - 0x14], 0
je 0x40b54b
mov eax, dword [edi]
test eax, eax
je 0x40b5e3
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x40b5e3
push dword [edi - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40b5e3
cmp dword [ebx], eax
jmp 0x40b587
mov eax, dword [edx]
test eax, eax
jns 0x40b558
movzx eax, ax
cmp esi, eax
jmp 0x40b587
mov ecx, dword [ebp - 0x1c]
add eax, 2
add eax, ecx
mov cl, byte [esi]
cmp cl, byte [eax]
jne 0x40b580
test cl, cl
je 0x40b57c
mov cl, byte [esi + 1]
cmp cl, byte [eax + 1]
jne 0x40b580
add esi, 2
add eax, 2
test cl, cl
jne 0x40b560
xor eax, eax
jmp 0x40b585
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40b5e3
push 0x468bb8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [ebp - 0x24]
mov ecx, ebx
mov edx, esi
call fcn.0040b3b0
test eax, eax
jne 0x40b5d8
push dword [ebp - 0x18]
xor edx, edx
mov ecx, ebx
push esi
call fcn.0040b350
add esp, 8
test eax, eax
je 0x40b5d8
mov ecx, dword [ebp - 0x18]
or dword [eax + 0x68], 1
mov dword [eax + 0x64], ecx
lea ecx, [ebp - 0x2c]
push ecx
push 0x20
push 0x6c
push eax
mov dword [ebp - 0xc], 1
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push 0x468bb8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [ebp - 4]
add edi, 0x10
cmp dword [edi + 4], 0
jne 0x40b4e0
add edx, 4
add ebx, 4
mov dword [ebp - 4], edx
test edx, edx
jne 0x40b4c6
mov esi, dword [ebp - 0x1c]
mov ecx, dword [ebp - 8]
add ecx, 0x14
mov dword [ebp - 8], ecx
add ecx, 0xfffffff4
cmp ecx, dword [ebp - 0x28]
mov ecx, dword [ebp - 8]
jne 0x40b472
mov edi, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret