Function at 0x1005bdb6
Capabilities:
Access peb ldr_data
Check os version
Parse pe header
Resolve function by hash
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
mov eax, 0x5a4d
mov dword [ebp - 0x14], 0
push edi
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x1c], ebx
cmp word [esi], ax
jne 0x1005c1a3
mov edi, dword [esi + 0x3c]
add edi, esi
mov dword [ebp - 8], edi
cmp dword [edi], 0x4550
jne 0x1005c1a3
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x14]
mov dword [ebp - 4], eax
test eax, eax
je 0x1005bfae
nop dword [eax + eax]
mov esi, dword [eax + 0x28]
xor ecx, ecx
movzx edx, word [eax + 0x24]
nop dword [eax]
movzx edi, byte [esi]
ror ecx, 0xd
cmp byte [esi], 0x61
jb 0x1005be34
add ecx, 0xffffffe0
add edx, 0xffff
add ecx, edi
inc esi
test dx, dx
jne 0x1005be26
cmp ecx, 0x6a4abc5b
jne 0x1005bf03
mov ebx, dword [ebp - 4]
mov edi, 3
mov esi, dword [ebx + 0x10]
mov eax, dword [esi + 0x3c]
mov eax, dword [eax + esi + 0x78]
add eax, esi
mov dword [ebp - 0x20], eax
mov ebx, dword [eax + 0x20]
mov eax, dword [eax + 0x24]
add ebx, esi
add eax, esi
mov dword [ebp - 0xc], eax
nop dword [eax]
mov edx, dword [ebx]
add edx, esi
xor eax, eax
mov cl, byte [edx]
nop dword [eax + eax]
ror eax, 0xd
lea edx, [edx + 1]
movsx ecx, cl
add eax, ecx
mov cl, byte [edx]
test cl, cl
jne 0x1005be86
cmp eax, 0xec0e4e8e
je 0x1005beac
cmp eax, 0x7c0dfcaa
je 0x1005beac
cmp eax, 0x91afca54
jne 0x1005bef1
mov ecx, dword [ebp - 0xc]
movzx edx, word [ecx]
mov ecx, dword [ebp - 0x20]
mov ecx, dword [ecx + 0x1c]
lea ecx, [ecx + edx*4]
add ecx, esi
cmp eax, 0xec0e4e8e
jne 0x1005becd
mov eax, dword [ecx]
add eax, esi
mov dword [ebp - 0x14], eax
jmp 0x1005beeb
cmp eax, 0x7c0dfcaa
jne 0x1005bedd
mov eax, dword [ecx]
add eax, esi
mov dword [ebp - 0x18], eax
jmp 0x1005beeb
cmp eax, 0x91afca54
jne 0x1005beeb
mov eax, dword [ecx]
add eax, esi
mov dword [ebp - 0x10], eax
add edi, 0xffff
add dword [ebp - 0xc], 2
add ebx, 4
test di, di
jne 0x1005be76
jmp 0x1005bf7f
cmp ecx, 0x3cfa685d
jne 0x1005bf82
mov ebx, dword [ebp - 4]
mov dword [ebp - 0xc], 1
mov ebx, dword [ebx + 0x10]
mov eax, dword [ebx + 0x3c]
mov eax, dword [eax + ebx + 0x78]
add eax, ebx
mov dword [ebp - 0x20], eax
mov edi, dword [eax + 0x20]
mov esi, dword [eax + 0x24]
add edi, ebx
add esi, ebx
mov eax, dword [edi]
xor ecx, ecx
lea edx, [eax + ebx]
mov al, byte [edx]
ror ecx, 0xd
lea edx, [edx + 1]
movsx eax, al
add ecx, eax
mov al, byte [edx]
test al, al
jne 0x1005bf37
cmp ecx, 0x534c0ab8
jne 0x1005bf71
mov eax, dword [ebp - 0x20]
movzx ecx, word [esi]
mov eax, dword [eax + 0x1c]
lea eax, [eax + ecx*4]
mov eax, dword [eax + ebx]
add eax, ebx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0xc]
add eax, 0xffff
mov dword [ebp - 0xc], eax
jmp 0x1005bf74
mov eax, dword [ebp - 0xc]
add edi, 4
add esi, 2
test ax, ax
jne 0x1005bf2e
mov ebx, dword [ebp - 0x10]
cmp dword [ebp - 0x14], 0
je 0x1005bf98
cmp dword [ebp - 0x18], 0
je 0x1005bf98
test ebx, ebx
je 0x1005bf98
cmp dword [ebp - 0x1c], 0
jne 0x1005bfa8
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov dword [ebp - 4], eax
test eax, eax
jne 0x1005be16
mov esi, dword [ebp + 8]
mov edi, dword [ebp - 8]
cmp dword [edi], 0x4550
jne 0x1005c1a3
push 0x40
push 0x3000
push dword [edi + 0x50]
push 0
call ebx
mov edx, dword [edi + 0x54]
mov ecx, esi
mov dword [ebp - 4], eax
test edx, edx
je 0x1005bfed
mov esi, eax
sub esi, dword [ebp + 8]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [esi + ecx - 1], al
sub edx, 1
jne 0x1005bfd9
mov eax, dword [ebp - 4]
mov esi, dword [ebp + 8]
mov ecx, dword [ebp - 8]
movzx edi, word [edi + 0x14]
add edi, 0x2c
movzx ebx, word [ecx + 6]
test ebx, ebx
je 0x1005c037
add edi, ecx
nop dword [eax + eax]
mov edx, dword [edi]
dec ebx
mov ecx, dword [edi - 8]
add edx, esi
mov esi, dword [edi - 4]
add ecx, eax
test esi, esi
je 0x1005c02a
mov al, byte [edx]
lea ecx, [ecx + 1]
mov byte [ecx - 1], al
lea edx, [edx + 1]
sub esi, 1
jne 0x1005c017
mov eax, dword [ebp - 4]
mov esi, dword [ebp + 8]
add edi, 0x28
test ebx, ebx
jne 0x1005c006
mov ecx, dword [ebp - 8]
mov edi, dword [ecx + 0x80]
mov edx, dword [ebp - 4]
add edi, edx
mov dword [ebp + 8], edi
mov eax, dword [edi + 0xc]
test eax, eax
je 0x1005c0c2
add eax, edx
push eax
call dword [ebp - 0x14]
mov esi, dword [edi]
mov ebx, eax
mov edx, dword [ebp - 4]
add esi, edx
mov edi, dword [edi + 0x10]
add edi, edx
cmp dword [edi], 0
je 0x1005c0af
nop
test esi, esi
je 0x1005c08c
mov ecx, dword [esi]
test ecx, ecx
jns 0x1005c08c
mov eax, dword [ebx + 0x3c]
movzx ecx, cx
mov eax, dword [eax + ebx + 0x78]
sub ecx, dword [eax + ebx + 0x10]
mov eax, dword [eax + ebx + 0x1c]
lea eax, [eax + ecx*4]
mov eax, dword [eax + ebx]
add eax, ebx
jmp 0x1005c09b
mov eax, dword [edi]
add edx, 2
add eax, edx
push eax
push ebx
call dword [ebp - 0x18]
mov edx, dword [ebp - 4]
mov dword [edi], eax
add edi, 4
test esi, esi
lea eax, [esi + 4]
cmove eax, esi
cmp dword [edi], 0
mov esi, eax
jne 0x1005c066
mov edi, dword [ebp + 8]
add edi, 0x14
mov dword [ebp + 8], edi
mov eax, dword [edi + 0xc]
test eax, eax
jne 0x1005c04c
mov ecx, dword [ebp - 8]
mov edi, edx
sub edi, dword [ecx + 0x34]
cmp dword [ecx + 0xa4], 0
je 0x1005c180
mov eax, dword [ecx + 0xa0]
mov ecx, dword [eax + edx + 4]
add eax, edx
mov dword [ebp + 8], eax
test ecx, ecx
je 0x1005c17d
mov esi, dword [eax]
lea ebx, [ecx - 8]
add eax, 8
add esi, edx
shr ebx, 1
mov dword [ebp - 0x18], eax
je 0x1005c16a
movzx edx, word [eax]
dec ebx
mov ax, dx
mov ecx, edx
shr ax, 0xc
cmp ax, 0xa
jne 0x1005c11a
and edx, 0xfff
add dword [edx + esi], edi
jmp 0x1005c152
cmp ax, 3
jne 0x1005c12b
and ecx, 0xfff
add dword [ecx + esi], edi
jmp 0x1005c152
cmp ax, 1
jne 0x1005c142
and ecx, 0xfff
mov eax, edi
shr eax, 0x10
add word [ecx + esi], ax
jmp 0x1005c152
cmp ax, 2
jne 0x1005c152
and ecx, 0xfff
add word [ecx + esi], di
mov eax, dword [ebp - 0x18]
add eax, 2
mov dword [ebp - 0x18], eax
test ebx, ebx
jne 0x1005c0fc
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 4]
mov ecx, dword [eax + 4]
jmp 0x1005c16d
mov eax, dword [ebp + 8]
add eax, ecx
mov dword [ebp + 8], eax
mov ecx, dword [eax + 4]
test ecx, ecx
jne 0x1005c0eb
mov ecx, dword [ebp - 8]
mov esi, dword [ecx + 0x28]
push 0
push 0
push 0xffffffffffffffff
add esi, edx
call dword [ebp - 0x1c]
mov edi, dword [ebp - 4]
push 0
push 1
push edi
call esi
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4