Function at 0x4093f0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push esi
mov esi, ecx
mov dword [ebp - 0x20], edx
push edi
xor edi, edi
mov dword [ebp - 0x18], esi
mov dword [ebp - 8], edi
mov dword [ebp - 0x10], edi
test esi, esi
jne 0x409414
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
cmp esi, dword [0x4400bc]
je 0x40940c
mov eax, 0x5a4d
cmp word [esi], ax
jne 0x40940c
mov ecx, dword [esi + 0x3c]
cmp dword [ecx + esi], 0x4550
jne 0x40940c
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 0x40940c
push ebx
cmp eax, ecx
je 0x409465
lea ecx, [eax + 0xc]
mov dword [ebp - 0x1c], ecx
cmp dword [ecx - 8], 0
mov eax, dword [ecx]
jne 0x40946e
test eax, eax
jne 0x409472
mov edi, dword [ebp - 8]
pop ebx
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x409476
add eax, esi
jmp 0x409478
xor eax, eax
mov edx, dword [ecx - 0xc]
mov ebx, dword [ecx + 4]
mov dword [ebp - 0xc], eax
test edx, edx
jne 0x409494
mov edx, ebx
test ebx, ebx
jne 0x409498
pop ebx
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
cmp edx, ebx
jne 0x40949f
mov dword [ebp - 0x10], 1
add edx, esi
add ebx, esi
mov dword [ebp - 4], edx
test edx, edx
je 0x40960b
nop
cmp dword [edx], 0
je 0x409605
mov eax, dword [ebp - 0x20]
cmp dword [eax + 8], 0
je 0x4095f4
lea edi, [eax + 4]
nop dword [eax]
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 - 0x14], ecx
test eax, eax
je 0x409502
mov ecx, dword [ebp - 0xc]
test ecx, ecx
je 0x409502
push ecx
push eax
call dword [0x439ba4]
add esp, 8
test eax, eax
jne 0x4095e4
mov edx, dword [ebp - 4]
test esi, esi
je 0x40958a
cmp dword [ebp - 0x10], 0
je 0x40953f
mov eax, dword [edi]
test eax, eax
je 0x4095e4
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x4095e4
push dword [edi - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4095e4
cmp dword [ebx], eax
jmp 0x409588
mov eax, dword [edx]
test eax, eax
jns 0x409559
xor ecx, ecx
movzx eax, ax
cmp esi, eax
sete cl
test ecx, ecx
je 0x4095e4
jmp 0x40958a
mov ecx, dword [ebp - 0x18]
add eax, 2
add eax, ecx
mov cl, byte [esi]
cmp cl, byte [eax]
jne 0x409581
test cl, cl
je 0x40957d
mov cl, byte [esi + 1]
cmp cl, byte [eax + 1]
jne 0x409581
add esi, 2
add eax, 2
test cl, cl
jne 0x409561
xor eax, eax
jmp 0x409586
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4095e4
push 0x4422fc
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [ebp - 0x24]
mov ecx, ebx
mov edx, esi
call fcn.00409390
test eax, eax
jne 0x4095d9
push dword [ebp - 0x14]
xor edx, edx
mov ecx, ebx
push esi
call fcn.00409360
add esp, 8
test eax, eax
je 0x4095d9
mov ecx, dword [ebp - 0x14]
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 - 8], 1
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push 0x4422fc
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [ebp - 4]
add edi, 0x10
cmp dword [edi + 4], 0
jne 0x4094d0
add edx, 4
add ebx, 4
mov dword [ebp - 4], edx
test edx, edx
jne 0x4094b0
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
add ecx, 0x14
mov dword [ebp - 0x1c], ecx
lea eax, [ecx - 0xc]
cmp eax, dword [ebp - 0x28]
jne 0x409456
mov edi, dword [ebp - 8]
mov eax, edi
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret