Function at 0x40b430
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 0x40b4c3
cmp esi, dword [0x4666fc]
je 0x40b4c3
mov eax, 0x5a4d
cmp word [esi], ax
jne 0x40b4c3
mov ecx, dword [esi + 0x3c]
cmp dword [ecx + esi], 0x4550
jne 0x40b4c3
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 0x40b4c3
cmp eax, ecx
je 0x40b642
lea ecx, [eax + 0xc]
mov dword [ebp - 8], ecx
cmp dword [ecx - 8], 0
mov eax, dword [ecx]
jne 0x40b4a6
test eax, eax
je 0x40b63f
add eax, esi
jmp 0x40b4b0
test eax, eax
je 0x40b4ae
add eax, esi
jmp 0x40b4b0
xor eax, eax
mov edx, dword [ecx - 0xc]
mov ebx, dword [ecx + 4]
mov dword [ebp - 0x10], eax
test edx, edx
jne 0x40b4cc
mov edx, ebx
test ebx, ebx
jne 0x40b4d0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp edx, ebx
jne 0x40b4d7
mov dword [ebp - 0x14], 1
add edx, esi
add ebx, esi
mov dword [ebp - 4], edx
test edx, edx
je 0x40b62a
cmp dword [edx], 0
je 0x40b624
mov eax, dword [ebp - 0x20]
cmp dword [eax + 8], 0
je 0x40b613
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 0x40b532
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x40b532
push ecx
push eax
call dword [0x45b1f0]
add esp, 8
test eax, eax
jne 0x40b603
mov edx, dword [ebp - 4]
test esi, esi
je 0x40b5a9
cmp dword [ebp - 0x14], 0
je 0x40b56b
mov eax, dword [edi]
test eax, eax
je 0x40b603
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x40b603
push dword [edi - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40b603
cmp dword [ebx], eax
jmp 0x40b5a7
mov eax, dword [edx]
test eax, eax
jns 0x40b578
movzx eax, ax
cmp esi, eax
jmp 0x40b5a7
mov ecx, dword [ebp - 0x1c]
add eax, 2
add eax, ecx
mov cl, byte [esi]
cmp cl, byte [eax]
jne 0x40b5a0
test cl, cl
je 0x40b59c
mov cl, byte [esi + 1]
cmp cl, byte [eax + 1]
jne 0x40b5a0
add esi, 2
add eax, 2
test cl, cl
jne 0x40b580
xor eax, eax
jmp 0x40b5a5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40b603
push 0x468bb8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [ebp - 0x24]
mov ecx, ebx
mov edx, esi
call fcn.0040b3d0
test eax, eax
jne 0x40b5f8
push dword [ebp - 0x18]
xor edx, edx
mov ecx, ebx
push esi
call fcn.0040b370
add esp, 8
test eax, eax
je 0x40b5f8
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 0x40b500
add edx, 4
add ebx, 4
mov dword [ebp - 4], edx
test edx, edx
jne 0x40b4e6
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 0x40b492
mov edi, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret