Function at 0x513040
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x867561
mov eax, dword fs:[0]
push eax
sub esp, 0x74
mov eax, dword [0x8ce6f4]
xor eax, esp
mov dword [esp + 0x70], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x8ce6f4]
xor eax, esp
push eax
lea eax, [esp + 0x88]
mov dword fs:[0], eax
xor ebp, ebp
mov esi, ecx
mov ebx, 3
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x24], esi
cmp dword [esi + 0x2bc], ebx
je 0x5139b2
call fcn.004f4450
cmp dword [esi + 0x2bc], 1
jne 0x5130c0
cmp dword [esi + 0x17c], ebp
je 0x5130c0
call fcn.007c9a2f
mov eax, dword [eax + 4]
cmp byte [eax + 0x457], 0
je 0x5130c0
mov ecx, esi
call fcn.005091e0
call fcn.007c9a2f
mov eax, dword [eax + 4]
mov dword [esp + 0x50], eax
cmp dword [eax + 0x4b4], ebp
je 0x513302
cmp dword [eax + 0x500], 0xd
jne 0x513302
push pe_nt_image_headers32
call fcn.007c8529
add esp, 4
mov dword [esp + 0x48], eax
mov dword [esp + 0x90], ebp
cmp eax, ebp
je 0x513110
lea ecx, [esp + 0x54]
push ecx
push ebp
mov ecx, eax
call fcn.005fe590
jmp 0x513112
xor eax, eax
mov dword [esp + 0x90], 0xffffffff
cmp eax, ebp
je 0x513126
lea esi, [eax + 0x14]
jmp 0x513128
xor esi, esi
mov edi, dword [esp + 0x24]
cmp dword [edi + 0x2dc], esi
je 0x513158
cmp esi, ebp
je 0x513140
mov edx, dword [esi]
mov eax, dword [edx + 4]
push esi
call eax
mov eax, dword [edi + 0x2dc]
cmp eax, ebp
je 0x513152
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [edi + 0x2dc], esi
call fcn.007cff5d
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x513172
push 0x80004005
call fcn.004a8210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x38], eax
push 0x40dc74
lea ecx, [esp + 0x3c]
mov dword [esp + 0x94], 1
call fcn.004a8ed0
mov esi, dword [esp + 0x24]
mov eax, dword [esi + 0x114]
mov edi, dword [esp + 0x38]
mov ecx, dword [esi + 0x2dc]
mov edx, dword [eax]
push edi
push ecx
push eax
mov eax, dword [edx + 0xc]
call eax
mov dword [esp + 0x18], ebp
mov eax, dword [esi + 0x2dc]
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
push 0x42b488
push eax
mov eax, dword [ecx]
mov byte [esp + 0x9c], 2
call eax
mov dword [esp + 0x28], ebp
mov eax, dword [esi + 0x114]
mov ecx, dword [eax]
lea edx, [esp + 0x28]
push edx
push 0x430f70
push eax
mov eax, dword [ecx]
mov byte [esp + 0x9c], bl
call eax
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x18]
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x20]
call eax
mov eax, dword [esp + 0x28]
cmp eax, ebp
je 0x513223
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x28], ebp
mov eax, dword [esp + 0x18]
cmp eax, ebp
je 0x513237
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x18], ebp
mov esi, dword [esp + 0x24]
mov eax, dword [esi + 0x2dc]
mov ecx, dword [eax]
mov edx, dword [ecx]
add esi, 0x2e0
push esi
push 0x40ab40
push eax
call edx
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + 0x17c]
xor eax, eax
mov dword [esp + 0x30], eax
cmp ecx, ebp
je 0x51327d
mov edx, dword [ecx]
lea eax, [esp + 0x30]
push eax
push 0x40ccb8
push ecx
mov ecx, dword [edx]
call ecx
mov eax, dword [esp + 0x30]
mov byte [esp + 0x90], 4
cmp eax, ebp
je 0x513298
mov esi, dword [esi]
mov edx, dword [eax]
push esi
push eax
mov eax, dword [edx + 0xc]
call eax
mov eax, dword [esp + 0x30]
mov byte [esp + 0x90], bl
cmp eax, ebp
je 0x5132ab
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x28]
mov byte [esp + 0x90], 2
cmp eax, ebp
je 0x5132c3
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x18]
mov byte [esp + 0x90], 1
cmp eax, ebp
je 0x5132db
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
lea eax, [edi - 0x10]
mov dword [esp + 0x90], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x513302
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x24]
cmp dword [ecx + 0x2bc], 2
jne 0x513492
xor ecx, ecx
mov dword [esp + 0x18], ecx
mov edx, dword [esp + 0x24]
mov eax, dword [edx + 0x114]
mov dword [esp + 0x90], 5
cmp eax, ebp
je 0x51347b
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
push eax
mov eax, dword [ecx + 0x14]
call eax
test eax, eax
js 0x513477
mov dword [esp + 0x14], ebp
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
push ebp
lea edx, [esp + 0x18]
push edx
push 1
push eax
mov eax, dword [ecx + 0xc]
mov byte [esp + 0xa0], 6
call eax
test eax, eax
jne 0x51345f
mov edi, dword [esp + 0x24]
mov bl, 7
lea esp, [esp]
mov ecx, dword [esp + 0x14]
xor eax, eax
mov dword [esp + 0x20], eax
cmp ecx, ebp
je 0x5133a7
mov edx, dword [ecx]
lea eax, [esp + 0x20]
push eax
push 0x40ccc8
push ecx
mov ecx, dword [edx]
call ecx
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
mov byte [esp + 0x90], bl
cmp eax, ebp
je 0x51341b
cmp dword [edi + 0x270], ebp
jne 0x513401
push 0x18
call fcn.007c8529
add esp, 4
mov dword [esp + 0x48], eax
mov byte [esp + 0x90], 8
cmp eax, ebp
je 0x5133dd
mov ecx, eax
call fcn.004ed6f0
jmp 0x5133df
xor eax, eax
mov byte [esp + 0x90], bl
cmp eax, ebp
je 0x5133ef
add eax, 0xc
jmp 0x5133f1
xor eax, eax
push eax
lea ecx, [edi + 0x270]
call fcn.005b1960
mov eax, dword [esp + 0x20]
mov ecx, dword [edi + 0x270]
mov edx, dword [eax]
push ecx
push eax
mov eax, dword [edx + 0xc0]
call eax
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
mov byte [esp + 0x90], 6
cmp eax, ebp
je 0x513433
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov ecx, dword [esp + 0x14]
cmp ecx, ebp
je 0x513443
mov eax, dword [ecx]
push ecx
mov ecx, dword [eax + 8]
call ecx
mov dword [esp + 0x14], ebp
mov eax, dword [esp + 0x18]
mov edx, dword [eax]
mov edx, dword [edx + 0xc]
push ebp
lea ecx, [esp + 0x18]
push ecx
push 1
push eax
call edx
test eax, eax
je 0x513380
mov eax, dword [esp + 0x14]
mov byte [esp + 0x90], 5
cmp eax, ebp
je 0x513477
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x90], 0xffffffff
cmp ecx, ebp
je 0x513492
mov eax, dword [ecx]
push ecx
mov ecx, dword [eax + 8]
call ecx
xor ecx, ecx
mov dword [esp + 0x20], ecx
mov edx, dword [esp + 0x24]
mov eax, dword [edx + 0x114]
mov dword [esp + 0x90], 9
cmp eax, ebp
je 0x513992
mov ecx, dword [eax]
lea edx, [esp + 0x20]
push edx
push eax
mov eax, dword [ecx + 0x14]
call eax
test eax, eax
js 0x51398e
mov dword [esp + 0x14], ebp
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
push ebp
lea edx, [esp + 0x18]
push edx
push 1
push eax
mov eax, dword [ecx + 0xc]
mov byte [esp + 0xa0], 0xa
call eax
test eax, eax
jne 0x513976
mov ecx, dword [esp + 0x14]
push ecx
lea edx, [esp + 0x68]
push edx
call fcn.005c2e50
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x7c], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x80], edx
mov edx, dword [eax + 0xc]
lea eax, [esp + 0x7c]
push 0x40778c
push eax
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x90], edx
call fcn.004c17a0
mov ecx, dword [esp + 0x24]
add esp, 0x10
test eax, eax
je 0x51394a
xor eax, eax
mov dword [esp + 0x2c], eax
cmp ecx, ebp
je 0x513566
mov edx, dword [ecx]
lea eax, [esp + 0x2c]
push eax
push 0x408f28
push ecx
mov ecx, dword [edx]
call ecx
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x90], 0xb
cmp eax, ebp
je 0x513932
mov esi, dword [esp + 0x50]
mov edi, dword [esi + 0x46c]
cmp edi, ebp
jne 0x513590
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov edi, eax
mov eax, dword [esp + 0x2c]
mov ecx, dword [esi + 0x470]
mov dword [esp + 0x30], ecx
cmp ecx, ebp
jne 0x5135ac
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x38]
mov dword [esp + 0x38], ebp
mov edx, dword [eax]
mov edx, dword [edx + 0xc]
push ecx
push eax
call edx
mov dword [esp + 0x18], ebp
cmp dword [esp + 0x38], ebp
jbe 0x51392a
jmp 0x5135d0
mov eax, dword [esp + 0x2c]
push ebp
push ebp
lea edx, [esp + 0x4c]
push edx
lea edx, [esp + 0x68]
push edx
lea edx, [esp + 0x50]
push edx
lea edx, [esp + 0x6c]
push edx
lea edx, [esp + 0x64]
push edx
mov edx, dword [esp + 0x34]
mov dword [esp + 0x68], ebp
mov dword [esp + 0x74], ebp
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x78], ebp
mov dword [esp + 0x60], ebp
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x10]
call eax
test eax, eax
js 0x513917
mov ecx, dword [esp + 0x44]
push ecx
lea ecx, [esp + 0x38]
call fcn.004a8f10
mov byte [esp + 0x90], 0xc
call fcn.007cff5d
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
je 0x513168
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x28], esi
push 0x8153
mov byte [esp + 0x94], 0xd
call fcn.007cfe78
cmp eax, ebp
je 0x51367b
push 0x8153
push eax
lea ecx, [esp + 0x30]
call fcn.004a8d10
mov esi, dword [esp + 0x28]
push 0x40dc60
lea ecx, [esp + 0x40]
mov byte [esp + 0x94], 0xe
call fcn.004a8f10
mov byte [esp + 0x90], 0xf
cmp edi, 0xffffffff
je 0x5136e0
mov ecx, dword [esp + 0x40]
xor ecx, edi
test ecx, 0x3ff
jne 0x5136e0
mov edx, dword [esp + 0x34]
mov eax, dword [esi - 0xc]
cmp dword [edx - 0xc], eax
jle 0x5136e0
push eax
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x3c]
call fcn.004ac570
mov eax, dword [eax]
or dword [esp + 0x1c], 1
push esi
push eax
call fcn.00801f5b
add esp, 8
cmp eax, ebp
jne 0x5136e0
mov bl, 1
jmp 0x5136e2
xor bl, bl
test byte [esp + 0x1c], 1
mov dword [esp + 0x90], 0xf
je 0x513719
mov eax, dword [esp + 0x54]
and dword [esp + 0x1c], 0xfffffffe
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x513719
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x513737
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x18]
mov ecx, dword [eax]
push 1
push edx
push eax
mov eax, dword [ecx + 0x14]
call eax
test eax, eax
js 0x513737
or edi, 0xffffffff
mov eax, dword [esp + 0x30]
cmp eax, 0xffffffff
je 0x5137f3
mov ecx, dword [esp + 0x40]
xor ecx, eax
test ecx, 0x3ff
jne 0x5137f3
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x3c]
mov ecx, dword [ecx - 0xc]
mov eax, dword [edx - 0xc]
cmp ecx, eax
jle 0x5137f3
push eax
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x3c]
call fcn.004ac570
or dword [esp + 0x1c], 2
mov edx, dword [esp + 0x3c]
xor ecx, ecx
cmp edx, ebp
setne cl
mov byte [esp + 0x90], 0x11
cmp ecx, ebp
je 0x513168
mov eax, dword [eax]
push edx
push eax
call fcn.00801f5b
add esp, 8
cmp eax, ebp
jne 0x5137f3
mov ecx, dword [esp + 0x3c]
mov eax, dword [ecx - 0xc]
push eax
lea edx, [esp + 0x64]
push edx
lea ecx, [esp + 0x3c]
call fcn.004aa4c0
or dword [esp + 0x1c], 4
mov ecx, eax
mov dword [esp + 0x90], 0x12
call fcn.004aa620
mov ecx, eax
call fcn.004aa3a0
push 0x40dc58
mov ecx, eax
call fcn.004a89c0
test eax, eax
je 0x5137f3
mov bl, 1
jmp 0x5137f5
xor bl, bl
test byte [esp + 0x1c], 4
mov dword [esp + 0x90], 0x11
je 0x51382c
mov eax, dword [esp + 0x60]
and dword [esp + 0x1c], 0xfffffffb
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x51382c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test byte [esp + 0x1c], 2
mov dword [esp + 0x90], 0xf
je 0x513863
mov eax, dword [esp + 0x48]
and dword [esp + 0x1c], 0xfffffffd
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x513863
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x513886
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x18]
mov ecx, dword [eax]
push 1
push edx
push eax
mov eax, dword [ecx + 0x14]
call eax
test eax, eax
js 0x513886
mov dword [esp + 0x30], 0xffffffff
mov eax, dword [esp + 0x4c]
cmp eax, ebp
je 0x513894
push eax
call fcn.005d9c50
mov eax, dword [esp + 0x44]
cmp eax, ebp
je 0x5138a3
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
mov byte [esp + 0x90], 0xe
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5138cb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov byte [esp + 0x90], 0xc
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5138ef
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
mov byte [esp + 0x90], 0xb
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x513917
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
inc eax
mov dword [esp + 0x18], eax
cmp eax, dword [esp + 0x38]
jb 0x5135d0
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x90], 0xa
cmp eax, ebp
je 0x51394a
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov ecx, dword [esp + 0x14]
cmp ecx, ebp
je 0x51395a
mov eax, dword [ecx]
push ecx
mov ecx, dword [eax + 8]
call ecx
mov dword [esp + 0x14], ebp
mov eax, dword [esp + 0x20]
mov edx, dword [eax]
mov edx, dword [edx + 0xc]
push ebp
lea ecx, [esp + 0x18]
push ecx
push 1
push eax
call edx
test eax, eax
je 0x5134f2
mov eax, dword [esp + 0x14]
mov byte [esp + 0x90], 9
cmp eax, ebp
je 0x51398e
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x90], 0xffffffff
cmp ecx, ebp
je 0x5139a9
mov eax, dword [ecx]
push ecx
mov ecx, dword [eax + 8]
call ecx
mov ecx, dword [esp + 0x24]
call fcn.004f4450
mov ecx, dword [esp + 0x88]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.0080262b
add esp, 0x80
ret