Function at 0x403e59
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
push edi
and esp, 0xfffffff8
sub esp, 0x78
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov edx, 0xffffffff
mov word [esp + 0x72], 0xa5f8
mov dword [esp + 0x5c], 0x1c1e0867
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0x1963cf9a
mov dword [esp + 0x54], 0x78bab970
cmp eax, 0
sete bl
cmp ecx, 0
sete bh
and bh, bl
mov dword [esp + 0x44], edx
test bh, 1
mov dword [esp + 0xc], eax
mov dword [esp + 8], ecx
jne 0x40409c
jmp 0x4040a8
mov ax, 0xa5f9
mov ecx, dword [esp + 0x68]
xor ecx, 0xffffffff
mov dword [esp + 0x68], ecx
mov ecx, dword [esp + 0x4c]
mov dx, word [ecx + 0x24]
sub ax, word [esp + 0x72]
mov cx, ax
shr dx, cl
movzx esi, dx
mov dword [esp + 0x50], esi
cmp dx, 0
je 0x403f84
jmp 0x403fa4
mov eax, dword [esp + 0x40]
mov cl, byte [esp + 0x33]
mov dword [esp + 0x44], eax
test cl, 1
jne 0x40409c
jmp 0x403f84
mov eax, dword [esp + 0x58]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x68], 0x804464c6
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x68], 0xda675340
mov eax, dword [eax + 0x28]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x4c]
mov eax, dword [eax + 0x10]
mov dword [esp + 0x40], eax
mov cl, byte [esp + 0x17]
mov eax, dword [esp + 0xc]
cmp dword [esp + 0x40], eax
sete dl
and cl, dl
test cl, 1
jne 0x403fcc
jmp 0x403ebf
mov eax, dword [esp + 0x68]
or eax, 0x16f8fc18
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x2c]
mov ecx, dword [ecx]
mov dword [esp + 0x58], ecx
mov dword [esp + 0x44], 0
cmp ecx, eax
je 0x40409c
jmp 0x403f0e
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x58], 0
cmp eax, 0x3489e70b
ja 0x403f57
jmp 0x403f0e
mov dword [esp + 0x34], 0
jmp 0x403fdc
mov eax, dword [esp + 0xc]
cmp eax, 0
setne cl
and cl, 1
mov byte [esp + 0x17], cl
mov edx, dword [esp + 0x10]
mov dword [esp + 0x58], edx
jmp 0x403f0e
mov eax, dword [esp + 0x4c]
add eax, 0xfffffff8
mov dword [esp + 0x44], eax
jmp 0x40409c
mov eax, dword [esp + 0x34]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x3c]
mov dx, word [eax + ecx*2]
mov word [esp + 0x4a], dx
mov dx, word [esp + 0x4a]
add dx, 0xffbf
mov word [esp + 0x1e], dx
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
xor eax, 0x3eaf7b9a
or eax, ecx
mov dword [esp + 4], eax
je 0x403f84
jmp 0x40401e
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 8]
mov dx, word [ecx + eax*2]
mov si, word [esp + 0x4a]
mov di, word [esp + 0x4a]
mov bx, word [esp + 0x1e]
add si, 0x20
cmp bx, 0x1a
cmovb di, si
cmp dx, di
sete al
and al, 1
mov byte [esp + 0x33], al
mov eax, dword [esp + 0x50]
mov cl, byte [esp + 0x6f]
add cl, 0xe6
mov ch, byte [esp + 0x33]
cmp di, 0
setne dl
and ch, dl
mov edx, dword [esp + 0x3c]
add edx, 1
mov byte [esp + 0x6f], cl
cmp edx, eax
setb cl
and ch, cl
mov dword [esp + 0x34], edx
mov si, word [esp + 0x70]
or si, 0x500
mov word [esp + 0x70], si
test ch, 1
jne 0x403fdc
jmp 0x403ef7
mov eax, dword [esp + 0x44]
lea esp, [ebp - 0xc]
pop edi
pop ebx
pop esi
pop ebp
ret
mov eax, dword [esp + 0x5c]
xor eax, 0x1c1e1867
mov dword [esp], eax
mov ecx, dword fs:[0x18]
xor eax, eax
mov edx, dword [esp]
cmp ecx, edx
cmovb ecx, eax
mov eax, dword [ecx + 0x30]
mov eax, dword [eax + 0xc]
add eax, 0x14
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x38]
mov eax, dword [eax]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x44], 0
cmp ecx, eax
je 0x40409c
jmp 0x403fae