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

Disassembly:
push 0xffffffffffffffff
push 0x5b48ee
mov eax, dword fs:[0]
push eax
sub esp, 0x170
mov eax, dword [0x62c930]
xor eax, esp
mov dword [esp + 0x168], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x62c930]
xor eax, esp
push eax
lea eax, [esp + 0x184]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x1b0]
mov esi, ecx
mov dword [esp + 0x24], esi
lea eax, [esp + 0xe4]
xor ebx, ebx
push eax
mov dword [esp + 0x190], ebx
call fcn.0048ac40
mov eax, 0xfffffe00
and dword [esp + 0x6c], eax
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
and dword [esp + 0x9c], eax
mov dword [esp + 0xa0], ebx
mov dword [esp + 0xa4], ebx
mov dword [esp + 0xa8], ebx
mov byte [esp + 0x18c], 5
call fcn.005759db
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40d5e1
push 0x80004005
call fcn.00401b20
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0x18c], 6
call fcn.005759db
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40d613
push 0x80004005
call fcn.00401b20
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov dword [esp + 0xe0], 0xf
mov dword [esp + 0xdc], ebx
mov byte [esp + 0xcc], 0
lea ecx, [esp + 0x7c]
push ecx
mov byte [esp + 0x190], 8
call fcn.00405eb0
mov byte [esp + 0x18c], 9
mov dword [esp + 0x28], 1
cmp dword [esp + 0x1a8], ebx
je 0x40db33
lea edx, [esp + 0x64]
push edx
lea eax, [esp + 0x198]
push eax
lea edi, [esp + 0xec]
call fcn.0048ad20
test al, al
je 0x40db33
push str.3dm_game_filesGamepics
add esi, 0x6c4
lea ecx, [esp + 0x24]
push esi
push ecx
call fcn.00405c70
add esp, 0xc
mov byte [esp + 0x18c], 0xa
mov ecx, dword [esp + 0x20]
call fcn.0041ea70
mov ecx, dword [ebp + 0x10]
sub ecx, dword [ebp + 0xc]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x40db04
push ebx
mov edi, ebp
call fcn.00417440
mov edx, dword [eax + 4]
add eax, 4
lea esi, [esp + 0x44]
call fcn.0041f160
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0xd4]
mov byte [esp + 0x198], 0xb
call fcn.00407ce0
mov esi, 0x10
mov byte [esp + 0x18c], 0xa
cmp dword [esp + 0x5c], esi
jb 0x40d724
mov ecx, dword [esp + 0x48]
push ecx
call fcn.005759d0
add esp, 4
mov edi, dword [esp + 0xdc]
test edi, edi
je 0x40dac6
mov edx, dword [esp + 0xe0]
mov eax, dword [esp + 0xcc]
mov ecx, eax
cmp edx, esi
jae 0x40d750
lea ecx, [esp + 0xcc]
mov eax, ecx
add ecx, edi
push ecx
push eax
lea edx, [esp + 0x6c]
push edx
call fcn.0048fd50
mov ecx, eax
call fcn.0048f9b0
test eax, eax
je 0x40dac6
mov edx, dword [esp + 0xe0]
mov eax, dword [esp + 0xcc]
mov ecx, eax
cmp edx, esi
jae 0x40d78a
lea ecx, [esp + 0xcc]
mov eax, ecx
mov edx, dword [esp + 0xdc]
add ecx, edx
push ecx
push eax
lea eax, [esp + 0x6c]
push eax
call fcn.0048fd50
push 0x602df6
push str.arcurl
push eax
call fcn.0048fd50
push eax
lea ecx, [esp + 0x48]
call fcn.0048f640
lea ecx, [esp + 0x30]
push ecx
mov ecx, eax
mov byte [esp + 0x190], 0xc
call fcn.0041ef30
add esp, 4
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x190], 0xd
call fcn.00401a80
mov byte [esp + 0x18c], 0xc
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40d80a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x18c], 0xa
cmp dword [esp + 0x5c], esi
jb 0x40d825
mov ecx, dword [esp + 0x48]
push ecx
call fcn.005759d0
add esp, 4
mov edx, dword [esp + 0xe0]
mov eax, dword [esp + 0xcc]
mov ecx, eax
cmp edx, esi
jae 0x40d842
lea ecx, [esp + 0xcc]
mov eax, ecx
mov edx, dword [esp + 0xdc]
add ecx, edx
push ecx
push eax
lea eax, [esp + 0x6c]
push eax
call fcn.0048fd50
push 0x602dfe
push str.litpic
push eax
call fcn.0048fd50
push eax
lea ecx, [esp + 0x48]
call fcn.0048f640
lea ecx, [esp + 0x40]
push ecx
mov ecx, eax
mov byte [esp + 0x190], 0xe
call fcn.0041ef30
add esp, 4
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x190], 0xf
call fcn.00401a80
mov byte [esp + 0x18c], 0xe
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40d8c2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x5c], esi
jb 0x40d8d5
mov ecx, dword [esp + 0x48]
push ecx
call fcn.005759d0
add esp, 4
lea esi, [esp + 0xb0]
call fcn.0040dc90
push ebx
mov edi, ebp
mov byte [esp + 0x190], 0x10
call fcn.00417440
add eax, 8
lea edx, [esp + 0x1c]
push edx
mov ecx, eax
call fcn.00401a80
push ebx
call fcn.00417440
lea ecx, [esp + 0x18]
add eax, 0xc
push ecx
mov ecx, eax
call fcn.00401a80
mov edi, dword [esp + 0x18]
cmp dword [edi - 0xc], 0
je 0x40daab
mov esi, dword [edi - 0xc]
push 0x2f
push edi
call fcn.005844d3
add esp, 8
test eax, eax
jne 0x40d93a
or eax, 0xffffffff
jmp 0x40d93e
sub eax, edi
sar eax, 1
sub esi, eax
dec esi
push esi
lea edx, [esp + 0x38]
push edx
lea ecx, [esp + 0x20]
call fcn.00405ab0
mov esi, eax
push 0x60249c
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x34]
push ecx
mov byte [esp + 0x198], 0x11
call fcn.00405c70
add esp, 0xc
push esi
push eax
lea edx, [esp + 0x40]
push edx
mov byte [esp + 0x198], 0x12
call fcn.00405bb0
add esp, 0xc
mov esi, eax
push ebx
mov edi, ebp
mov byte [esp + 0x190], 0x13
call fcn.00417440
add eax, 0x10
push esi
mov ecx, eax
call fcn.00401a80
mov byte [esp + 0x18c], 0x12
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d9cd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x18c], 0x11
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d9f5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x18c], 0x10
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40da1d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esi, [esp + 0x44]
call fcn.0040c810
push ebx
mov edi, ebp
mov byte [esp + 0x190], 0x14
call fcn.00417440
add eax, 0xc
push eax
lea ecx, [esp + 0x4c]
call fcn.00401a80
push ebx
call fcn.00417440
add eax, 0x10
push eax
mov ecx, esi
call fcn.00401a80
mov ecx, dword [esp + 0x44]
push 0
push ecx
call fcn.00584007
add esp, 8
test eax, eax
je 0x40da89
sub esp, 0x20
mov edx, esp
mov dword [esp + 0x5c], esp
push edx
mov edi, esi
call fcn.00408d40
mov ecx, dword [esp + 0x44]
push 0
add ecx, 0x4f4
call fcn.00408b80
cmp byte [esp + 0x1b4], 0
je 0x40daa2
mov esi, dword [esp + 0x24]
add esi, 0x4f4
call fcn.00408dd0
lea esi, [esp + 0x44]
call fcn.00422f80
lea esi, [esp + 0xb0]
mov byte [esp + 0x18c], 0xa
call fcn.0040dd40
mov esi, 0x10
jmp 0x40dae0
push ebx
mov edi, ebp
call fcn.00417440
mov ecx, eax
add ecx, 4
call fcn.00401780
mov dword [esp + 0x28], 0
mov ecx, dword [ebp + 0x10]
sub ecx, dword [ebp + 0xc]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
inc ebx
add eax, edx
cmp ebx, eax
jne 0x40d6d4
xor ebx, ebx
jmp 0x40db09
mov esi, 0x10
mov byte [esp + 0x18c], 9
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40db38
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40db38
mov esi, 0x10
mov eax, dword [esp + 0x88]
cmp eax, ebx
je 0x40db67
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x8c]
push ecx
call fcn.0041c990
mov edx, dword [esp + 0x8c]
add esp, 4
push edx
call fcn.005759d0
add esp, 4
mov eax, dword [esp + 0x7c]
push eax
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x90], ebx
mov dword [esp + 0x94], ebx
call fcn.005759d0
add esp, 4
cmp dword [esp + 0xe0], esi
jb 0x40dba2
mov ecx, dword [esp + 0xcc]
push ecx
call fcn.005759d0
add esp, 4
mov byte [esp + 0x18c], 6
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0xe0], 0xf
mov dword [esp + 0xdc], ebx
mov byte [esp + 0xcc], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40dbe4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x18c], 5
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40dc0c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esi, [esp + 0x94]
mov byte [esp + 0x18c], 3
call fcn.0048f400
lea esi, [esp + 0x64]
mov byte [esp + 0x18c], 1
call fcn.0048f400
lea edi, [esp + 0xe4]
call fcn.0040d240
cmp dword [esp + 0x1ac], 0x10
jb 0x40dc57
mov ecx, dword [esp + 0x198]
push ecx
call fcn.005759d0
add esp, 4
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x184]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x168]
xor ecx, esp
call fcn.005832f8
add esp, 0x17c
ret 0x24