Function at 0x40af60
Capabilities:
Check if file exists
Create process on windows
Delete file
Get common file path
Get file attributes
Query environment variable
Resolve function by parsing pe exports
Set file attributes
Terminate process

Disassembly:
push 0xffffffffffffffff
push 0x5b388f
mov eax, dword fs:[0]
push eax
sub esp, 0xd08
mov eax, dword [0x62c930]
xor eax, esp
mov dword [esp + 0xd00], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x62c930]
xor eax, esp
push eax
lea eax, [esp + 0xd1c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0xd2c]
xor edi, edi
lea esi, [esp + 0x1c]
mov dword [esp + 0x40], ebp
mov dword [esp + 0x20], edi
call fcn.0041e9b0
mov dword [esp + 0xd24], edi
call fcn.005759db
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40afd6
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 + 0x24], eax
push 0x602c60
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x20]
push edx
mov byte [esp + 0xd30], 1
call fcn.00405c70
add esp, 0xc
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0xd28], 2
call fcn.00401a80
mov byte [esp + 0xd24], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b03f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x24]
mov edi, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
lea ecx, [esp + 0x94]
push ecx
push edx
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp eax, 0xffffffff
je 0x40b0ba
lea eax, [esp + 0xc0]
push eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x20]
push edx
call fcn.00405c70
add esp, 0xc
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0xd28], 3
call fcn.00401a80
mov byte [esp + 0xd24], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b0b3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x24]
push ecx
call ebx
push 0x602c74
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x20]
push eax
call fcn.00405c70
add esp, 0xc
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0xd28], 4
call fcn.00401a80
mov byte [esp + 0xd24], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b10b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x94]
push ecx
push edx
call edi
cmp eax, 0xffffffff
je 0x40b17a
lea eax, [esp + 0xc0]
push eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x20]
push edx
call fcn.00405c70
add esp, 0xc
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0xd28], 5
call fcn.00401a80
mov byte [esp + 0xd24], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b173
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x24]
push ecx
call ebx
mov eax, dword [esp + 0x1c]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x48], esp
mov esi, esp
push eax
call fcn.00401a10
add eax, 0x10
mov dword [esi], eax
mov byte [esp + 0xd2c], 6
mov ecx, esp
mov dword [esp + 0x50], esp
push str.Update.exe
lea esi, [esp + 0x2f0]
call fcn.004016c0
mov ecx, esi
mov byte [esp + 0xd2c], 1
call fcn.0041f330
mov esi, eax
add esp, 8
cmp esi, 0xffffffff
je 0x40b1f1
lea edx, [esp + 0x20]
push edx
push esi
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov eax, dword [esp + 0x20]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push str.Update.exe
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x20]
push edx
call fcn.00405c70
add esp, 0xc
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0xd28], 7
call fcn.00401a80
mov byte [esp + 0xd24], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b24d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x94]
push ecx
push edx
call edi
cmp eax, 0xffffffff
je 0x40b2bc
lea eax, [esp + 0xc0]
push eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x20]
push edx
call fcn.00405c70
add esp, 0xc
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0xd28], 8
call fcn.00401a80
mov byte [esp + 0xd24], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b2b5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x24]
push ecx
call ebx
call fcn.005759db
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40b2d6
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 + 0x3c], eax
mov byte [esp + 0xd24], 9
mov ecx, dword [ebp + 0x6bc]
mov esi, dword [ecx - 0xc]
lea edi, [ebp + 0x6bc]
mov eax, ecx
push 0x5c
push eax
call fcn.005844d3
add esp, 8
test eax, eax
jne 0x40b313
or eax, 0xffffffff
jmp 0x40b317
sub eax, dword [edi]
sar eax, 1
sub esi, eax
dec esi
push esi
lea edx, [esp + 0x1c]
push edx
mov ecx, edi
call fcn.00405ab0
push eax
lea ecx, [esp + 0x40]
mov byte [esp + 0xd28], 0xa
call fcn.00401a80
mov byte [esp + 0xd24], 9
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b361
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x3c]
push 0x602c60
push ecx
call fcn.00405d50
add esp, 8
test al, al
jne 0x40b391
lea edx, [esp + 0x3c]
push str.GameLinks.exe
push edx
call fcn.00405d50
add esp, 8
test al, al
je 0x40b434
lea esi, [esp + 0x20]
call fcn.0041e9b0
push 0x602c74
push eax
lea eax, [esp + 0x20]
mov bl, 0xb
push eax
mov byte [esp + 0xd30], bl
call fcn.00405c70
add esp, 0xc
lea esi, [ebp + 0x7c8]
push eax
mov ecx, esi
mov byte [esp + 0xd28], 0xc
call fcn.00401a80
mov byte [esp + 0xd24], bl
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b3f3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xd24], 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 0x40b41b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esi]
mov edi, dword [edi]
push esi
push edi
call fcn.005848bb
add esp, 8
mov dword [esp + 0xd24], 9
lea eax, [ebp + 0x558]
lea esi, [esp + 0x38]
call fcn.004022f0
mov byte [esp + 0xd24], 0xf
mov edi, dword [esp + 0x38]
mov esi, dword [edi - 0xc]
xor eax, eax
test esi, esi
jle 0x40b49c
test eax, eax
jl 0x40b786
cmp eax, esi
jg 0x40b786
movzx ecx, word [edi + eax*2]
movzx edx, cx
cmp dx, 0x2e
je 0x40b497
cmp eax, esi
jg 0x40b786
movzx edx, cx
cmp dx, 0x2f
je 0x40b497
cmp eax, esi
jg 0x40b786
movzx ecx, cx
cmp cx, 0x5c
jne 0x40b49c
inc eax
cmp eax, esi
jl 0x40b458
push eax
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x40]
call fcn.00405a80
push eax
lea ecx, [esp + 0x3c]
mov byte [esp + 0xd28], 0x10
call fcn.00401a80
mov byte [esp + 0xd24], 0xf
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40b4e5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [ebp + 0x60c], 0
je 0x40b581
mov eax, dword [ebp + 0x5e0]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40b581
lea esi, [esp + 0x18]
call fcn.0041e9b0
lea ecx, [esp + 0x38]
push ecx
push eax
lea edx, [esp + 0x28]
push edx
mov byte [esp + 0xd30], 0x11
call fcn.00405bb0
mov byte [esp + 0xd30], 0xf
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
add esp, 0xc
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b552
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x20]
or edi, 6
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40b581
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor ecx, ecx
push 0x7fe
push ecx
lea edx, [esp + 0x51e]
push edx
mov word [esp + 0x520], cx
call fcn.00587fb0
add esp, 0xc
lea eax, [esp + 0x514]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
xor ecx, ecx
mov word [esp + eax*2 + 0x514], cx
lea eax, [esp + 0x514]
lea edx, [eax + 2]
jmp 0x40b5d0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40b5d0
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x518]
push edx
lea ecx, [esp + 0x24]
call fcn.00401960
push 1
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x24]
call fcn.00405ab0
push 0x60249c
mov byte [esp + 0xd28], 0x12
mov ebx, 1
push eax
mov dword [esp + 0x28], ebx
call fcn.00405e20
add esp, 8
test al, al
je 0x40b64f
push ebx
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x24]
call fcn.00405ab0
push 0x60278c
push eax
mov ebx, 3
call fcn.00405e20
add esp, 8
mov byte [esp + 0x2f], 1
test al, al
jne 0x40b654
mov byte [esp + 0x2f], 0
test bl, 2
je 0x40b680
mov eax, dword [esp + 0x18]
and ebx, 0xfffffffd
add eax, 0xfffffff0
mov dword [esp + 0x20], ebx
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40b680
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0xd24], 0xf
test bl, 1
je 0x40b6b0
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b6b0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [esp + 0x2f], 0
je 0x40b6c7
push 1
push 0x60249c
lea ecx, [esp + 0x24]
call fcn.00407850
mov ecx, dword [ebp + 0x5d8]
sub ecx, dword [ebp + 0x5d4]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 3
mov ecx, edx
xor esi, esi
shr ecx, 0x1f
add ecx, edx
mov dword [esp + 0x18], esi
je 0x40bb58
mov dword [esp + 0x20], esi
jmp 0x40b700
mov eax, dword [esp + 0x40]
mov ecx, dword [eax + 0x5d8]
sub ecx, dword [eax + 0x5d4]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jb 0x40b730
call fcn.0058465c
mov ecx, dword [esp + 0x40]
mov ebp, dword [ecx + 0x5d4]
add ebp, dword [esp + 0x20]
push 0x400
mov eax, dword [ebp + 0x28]
lea edx, [esp + 0x518]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor ebx, ebx
cmp eax, ebx
jbe 0x40bb21
lea edx, [esp + 0x514]
xor ecx, ecx
push edx
mov word [esp + eax*2 + 0x518], cx
call edi
test eax, eax
jne 0x40bb21
cmp dword [ebp + 0x18], 0x10
jb 0x40b790
mov eax, dword [ebp + 4]
jmp 0x40b793
push 0x80070057
call fcn.00401b20
lea eax, [ebp + 4]
push eax
lea ecx, [esp + 0x34]
call fcn.00408510
mov byte [esp + 0xd24], 0x13
mov eax, dword [esp + 0x30]
push 0x2f
push eax
call fcn.005844d3
add esp, 8
cmp eax, ebx
jne 0x40b7bd
or eax, 0xffffffff
jmp 0x40b7c3
sub eax, dword [esp + 0x30]
sar eax, 1
inc eax
push eax
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x38]
call fcn.00405a80
mov byte [esp + 0xd24], 0x14
mov esi, dword [esp + 0x34]
cmp dword [esi - 0xc], ebx
jle 0x40b845
push 0x3f
push esi
call fcn.00584f34
add esp, 8
cmp eax, ebx
je 0x40b845
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x40b845
push eax
lea edx, [esp + 0x4c]
push edx
lea ecx, [esp + 0x3c]
call fcn.00405b30
push eax
lea ecx, [esp + 0x38]
mov byte [esp + 0xd28], 0x15
call fcn.00401a80
mov byte [esp + 0xd24], 0x14
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b845
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x30]
push eax
call fcn.00405bb0
add esp, 0xc
mov byte [esp + 0xd24], 0x16
mov ecx, dword [esp + 0x28]
push ecx
call edi
test eax, eax
je 0x40b87a
mov edx, dword [esp + 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edx, dword [esp + 0x28]
or edi, 0xffffffff
lea esi, [esp + 0x78]
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], edi
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
mov byte [esp + 0x64], 0
mov dword [esp + 0x68], ebx
call fcn.0041f160
sub esp, 0x1c
mov ecx, esp
mov byte [esp + 0xd40], 0x17
mov dword [esp + 0x8c], esp
push edi
push ebx
lea eax, [esp + 0x9c]
mov esi, 0xf
mov dword [ecx + 0x18], esi
mov dword [ecx + 0x14], ebx
push eax
mov byte [ecx + 4], 0
call fcn.00407ce0
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0xac], esp
push edi
mov byte [esp + 0xd60], 0x18
push ebx
mov dword [ecx + 0x18], esi
mov dword [ecx + 0x14], ebx
push ebp
mov byte [ecx + 4], 0
call fcn.00407ce0
lea ecx, [esp + 0x84]
push ecx
mov byte [esp + 0xd60], 0x17
call fcn.0042e400
cmp eax, ebx
jne 0x40ba84
cmp byte [ebp + 0x2c], 0
je 0x40ba5d
mov edx, dword [esp + 0x28]
push edx
call fcn.004391f0
mov edi, eax
add esp, 4
cmp edi, ebx
je 0x40ba5d
lea eax, [ebp + 0x24]
push eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x4c]
push edx
call fcn.00405bb0
add esp, 0xc
push eax
lea ecx, [esp + 0x2c]
mov byte [esp + 0xd28], 0x19
call fcn.00401a80
mov byte [esp + 0xd24], 0x17
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b991
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [esp + 0x28]
mov eax, edi
call fcn.00439300
cmp eax, ebx
je 0x40ba43
cmp dword [edi], 1
sete al
test al, al
je 0x40b9c4
push edi
call fcn.00439340
add esp, 4
jmp 0x40b9c9
call fcn.00439cc0
lea ecx, [esp + 0x78]
call fcn.00408350
mov byte [esp + 0xd24], 0x14
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40b9fa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xd24], 0x13
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 0x40ba22
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xd24], 0xf
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x40bb15
cmp dword [edi], 1
sete al
test al, al
je 0x40ba58
push edi
call fcn.00439340
add esp, 4
jmp 0x40ba5d
call fcn.00439cc0
mov ebp, dword [ebp + 0x20]
push ebx
push ebx
cmp dword [ebp - 0xc], ebx
jne 0x40ba6f
mov ecx, dword [esp + 0x30]
push ebx
push ecx
jmp 0x40ba75
mov edx, dword [esp + 0x30]
push ebp
push edx
push 0x602cbc
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
or edi, 0xffffffff
cmp dword [esp + 0x90], 0x10
jb 0x40ba9b
mov eax, dword [esp + 0x7c]
push eax
call fcn.005759d0
add esp, 4
mov byte [esp + 0xd24], 0x14
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov dword [esp + 0x90], esi
mov dword [esp + 0x8c], ebx
mov byte [esp + 0x7c], 0
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bad5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xd24], 0x13
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bafc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xd24], 0xf
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edi
dec edi
test edi, edi
jg 0x40bb21
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x40]
mov ecx, dword [eax + 0x5d8]
sub ecx, dword [eax + 0x5d4]
mov esi, dword [esp + 0x18]
add dword [esp + 0x20], 0x30
mov eax, 0x2aaaaaab
imul ecx
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
inc esi
add ecx, edx
mov dword [esp + 0x18], esi
cmp esi, ecx
jb 0x40b700
mov byte [esp + 0xd24], 9
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40bb80
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xd24], 1
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bba8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xd24], 0
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bbd0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0xd24], 0xffffffff
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 0x40bbfb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0xd1c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xd00]
xor ecx, esp
call fcn.005832f8
add esp, 0xd14
ret 4