Function at 0x4041f0
Capabilities:
Check if file exists
Get common file path
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57b5c1
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x18a0
call fcn.0055ece0
mov eax, dword [0x5ef220]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, ecx
mov dword [ebp - 0x183c], ebx
xor eax, eax
mov dword [ebp - 0x1850], ebx
push 0x206
push eax
mov word [ebp - 0x428], ax
lea eax, [ebp - 0x426]
push eax
call fcn.0055c960
add esp, 0xc
xor eax, eax
mov word [ebp - 0x220], ax
push 0x206
push eax
lea eax, [ebp - 0x21e]
push eax
call fcn.0055c960
add esp, 0xc
lea eax, [ebp - 0x220]
mov ecx, ebx
push eax
call fcn.00402a30
push str.Config.ini
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCatW]
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x428]
push 0x104
push eax
call fcn.00558864
add esp, 0xc
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4042c3
xor al, al
jmp 0x406227
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x630], ax
lea eax, [ebp - 0x62e]
push eax
call fcn.0055c960
add esp, 0xc
lea eax, [ebp - 0x428]
push eax
push 0x104
lea eax, [ebp - 0x630]
push eax
push 0x5c52ec
push str.PlatformConfigFile
push str.set_platform
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea ecx, [ebp - 0x630]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404312
sub ecx, edx
sar ecx, 1
je 0x4042bc
lea eax, [ebp - 0x630]
push eax
lea ecx, [ebp - 0x1800]
call fcn.0040f690
mov dword [ebp - 4], 0
call fcn.004311d4
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x404358
push 0x80004005
call fcn.0040fbb0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x1824], eax
lea ecx, [ebp - 0x1800]
mov byte [ebp - 4], 1
call fcn.0040bfd0
mov eax, dword [ebp - 0x1800]
cmp dword [eax - 0xc], 0
jl 0x40448d
push str._GAMEDIR_
push eax
call fcn.00558e99
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x1800]
test ecx, ecx
je 0x4043ce
sub ecx, eax
sar ecx, 1
cmp ecx, 0xffffffff
je 0x4043ce
lea eax, [ecx + 9]
push eax
lea eax, [ebp - 0x17ec]
push eax
lea ecx, [ebp - 0x1800]
call fcn.0040c090
mov byte [ebp - 4], 2
push dword [eax]
lea eax, [ebx + 4]
jmp 0x404454
cmp dword [eax - 0xc], 0
jl 0x40448d
push str._APPDATA_
push eax
call fcn.00558e99
mov esi, eax
add esp, 8
test esi, esi
je 0x40448d
sub esi, dword [ebp - 0x1800]
sar esi, 1
cmp esi, 0xffffffff
je 0x40448d
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x220], ax
lea eax, [ebp - 0x21e]
push eax
call fcn.0055c960
add esp, 0xc
lea eax, [ebp - 0x220]
push 0
push 0x1a
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [esi + 9]
push eax
lea eax, [ebp - 0x17ec]
push eax
lea ecx, [ebp - 0x1800]
call fcn.0040c090
mov byte [ebp - 4], 3
push dword [eax]
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x1824]
push str._s_s
push eax
call fcn.0040f7d0
mov byte [ebp - 4], 1
or eax, 0xffffffff
mov edx, dword [ebp - 0x17ec]
add esp, 0x10
add edx, 0xfffffff0
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40448d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor edi, edi
mov dword [ebp - 0x181c], 0
mov dword [ebp - 0x17d8], edi
mov dword [ebp - 0x1818], edi
mov dword [ebp - 0x1814], edi
xor eax, eax
mov byte [ebp - 4], 4
push 0x206
push eax
mov word [ebp - 0x838], ax
lea eax, [ebp - 0x836]
push eax
call fcn.0055c960
mov eax, 1
add esp, 0xc
mov dword [ebp - 0x17dc], eax
jmp 0x4044e0
push eax
lea eax, [ebp - 0x838]
push str.platform_Game_d
push eax
call fcn.0040e0a0
add esp, 0xc
xor eax, eax
mov word [ebp - 0x1038], ax
push 0x7fe
push eax
lea eax, [ebp - 0x1036]
push eax
call fcn.0055c960
add esp, 0xc
xor eax, eax
mov word [ebp - 0x220], ax
push 0x206
push eax
lea eax, [ebp - 0x21e]
push eax
call fcn.0055c960
add esp, 0xc
lea eax, [ebp - 0x428]
push eax
push 0x400
lea eax, [ebp - 0x1038]
push eax
lea eax, [ebp - 0x838]
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionW]
lea ecx, [ebp - 0x1038]
lea edx, [ecx + 2]
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404560
sub ecx, edx
sar ecx, 1
je 0x40489e
lea esi, [ebp - 0x1038]
jmp 0x404580
call fcn.004311d4
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40434e
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x17e0], eax
mov byte [ebp - 4], 5
test esi, esi
jne 0x4045b0
xor ecx, ecx
jmp 0x4045c4
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4045b5
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x17e0]
call fcn.0040fa60
mov ebx, dword [ebp - 0x17e0]
mov eax, dword [ebx - 0xc]
test eax, eax
je 0x404868
lea esi, [esi + eax*2]
add esi, 2
mov dword [ebp - 0x180c], esi
call fcn.004311d4
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40434e
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x17c4], eax
mov byte [ebp - 4], 6
call fcn.004311d4
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40434e
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x17d0], eax
push 0x3d
push 0
push ebx
lea eax, [ebp - 0x17c4]
mov byte [ebp - 4], 7
push eax
call fcn.00431ced
push 0x3d
push 1
push ebx
lea eax, [ebp - 0x17d0]
push eax
call fcn.00431ced
push str.AppName
push dword [ebp - 0x17c4]
call fcn.005594af
add esp, 8
test eax, eax
lea eax, [ebp - 0x220]
jne 0x404704
push dword [ebp - 0x17d0]
push 0x104
push eax
call fcn.00558864
mov byte [ebp - 4], 6
add esp, 0xc
mov edx, dword [ebp - 0x17d0]
or ecx, 0xffffffff
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4046b9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 5
or ecx, 0xffffffff
mov edx, dword [ebp - 0x17c4]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4046dd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add ebx, 0xfffffff0
mov byte [ebp - 4], 4
or ecx, 0xffffffff
lea eax, [ebx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x404580
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x404580
push eax
lea eax, [ebp - 0x17c0]
push 0x104
push eax
call fcn.00558864
add esp, 0xc
lea eax, [ebp - 0x15b8]
push dword [ebp - 0x17c4]
push 0x104
push eax
call fcn.00558864
add esp, 0xc
lea eax, [ebp - 0x13b0]
push dword [ebp - 0x17d0]
push 0x104
push eax
call fcn.00558864
lea eax, [ebp - 0x17c0]
add esp, 0xc
cmp eax, edi
jae 0x4047aa
mov ecx, eax
mov eax, dword [ebp - 0x181c]
cmp eax, ecx
ja 0x4047aa
sub ecx, eax
mov eax, 0xa80a80a9
imul ecx
add edx, ecx
sar edx, 0xa
mov esi, edx
shr esi, 0x1f
add esi, edx
cmp edi, dword [ebp - 0x1814]
jne 0x404798
push ecx
lea ecx, [ebp - 0x181c]
call fcn.0040ceb0
mov edi, dword [ebp - 0x1818]
mov dword [ebp - 0x17d8], edi
imul esi, esi, 0x618
add esi, dword [ebp - 0x181c]
test edi, edi
je 0x4047e1
jmp 0x4047d4
cmp edi, dword [ebp - 0x1814]
jne 0x4047ca
push ecx
lea ecx, [ebp - 0x181c]
call fcn.0040ceb0
mov edi, dword [ebp - 0x1818]
mov dword [ebp - 0x17d8], edi
test edi, edi
je 0x4047e1
lea esi, [ebp - 0x17c0]
mov ecx, 0x186
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x17d8]
mov byte [ebp - 4], 6
add edi, 0x618
mov edx, dword [ebp - 0x17d0]
or esi, 0xffffffff
add edx, 0xfffffff0
mov dword [ebp - 0x1818], edi
mov dword [ebp - 0x17d8], edi
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x404819
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 5
mov ecx, esi
mov edx, dword [ebp - 0x17c4]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40483c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add ebx, 0xfffffff0
mov byte [ebp - 4], 4
mov ecx, esi
lea eax, [ebx + 0xc]
lock xadd dword [eax], ecx
dec ecx
mov esi, dword [ebp - 0x180c]
test ecx, ecx
jg 0x404580
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x404580
add ebx, 0xfffffff0
mov byte [ebp - 4], 4
or ecx, 0xffffffff
lea eax, [ebx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x404886
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x17dc]
inc eax
mov dword [ebp - 0x17dc], eax
cmp eax, 0xc7
jl 0x4044e0
sub edi, dword [ebp - 0x181c]
mov eax, 0xa80a80a9
imul edi
add edx, edi
sar edx, 0xa
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x4048cb
lea eax, [ebp - 0x181c]
push eax
push dword [ebp - 0x1824]
call fcn.00406360
mov dword [ebp - 0x180c], str.FileName
mov dword [ebp - 0x17cc], 0
mov dword [ebp - 0x17c8], 0
call fcn.0040dff0
mov esi, eax
mov dword [ebp - 0x17cc], esi
xor eax, eax
mov byte [ebp - 4], 8
push 0x206
push eax
mov word [ebp - 0x220], ax
lea eax, [ebp - 0x21e]
push eax
call fcn.0055c960
mov edi, 1
add esp, 0xc
mov dword [ebp - 0x17d0], edi
jmp 0x404930
push dword [esi + 4]
lea ecx, [ebp - 0x17cc]
call fcn.0040cdd0
mov eax, dword [ebp - 0x17cc]
push edi
push str.platform_ini_d
mov dword [eax + 4], eax
mov eax, dword [ebp - 0x17cc]
mov dword [eax], eax
mov eax, dword [ebp - 0x17cc]
mov dword [eax + 8], eax
lea eax, [ebp - 0x220]
push eax
mov dword [ebp - 0x17c8], 0
call fcn.0040e0a0
add esp, 0xc
lea eax, [ebp - 0x17cc]
lea edx, [ebp - 0x428]
lea ecx, [ebp - 0x220]
push eax
call fcn.00402470
add esp, 4
test eax, eax
je 0x404cd4
push str.FileName
lea ecx, [ebp - 0x17e8]
call fcn.0040f690
mov esi, dword [ebp - 0x17cc]
lea eax, [ebp - 0x17e8]
push eax
lea ecx, [ebp - 0x17cc]
call fcn.0040d570
cmp eax, dword [ebp - 0x17cc]
je 0x404a26
mov edx, dword [eax + 0x10]
xor ecx, ecx
test edx, edx
setne cl
test ecx, ecx
je 0x40434e
mov ecx, dword [ebp - 0x17e8]
mov edi, ecx
mov bx, word [edi]
cmp bx, word [edx]
jne 0x404a0a
test bx, bx
je 0x404a06
mov bx, word [edi + 2]
cmp bx, word [edx + 2]
jne 0x404a0a
add edi, 4
add edx, 4
test bx, bx
jne 0x4049e4
xor edx, edx
jmp 0x404a0f
sbb edx, edx
or edx, 1
test edx, edx
sets dl
test dl, dl
jne 0x404a2c
mov dword [ebp - 0x17ec], eax
lea eax, [ebp - 0x17ec]
jmp 0x404a3e
mov ecx, dword [ebp - 0x17e8]
mov eax, dword [ebp - 0x17cc]
mov dword [ebp - 0x1810], eax
lea eax, [ebp - 0x1810]
cmp dword [eax], esi
lea edx, [ecx - 0x10]
lea eax, [edx + 0xc]
setne bl
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x404a5d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test bl, bl
je 0x404cd4
mov eax, dword [ebp - 0x183c]
lea ecx, [ebp - 0x17dc]
add eax, 4
push eax
call fcn.0040f690
push str.FileName
lea ecx, [ebp - 0x17e0]
mov byte [ebp - 4], 9
call fcn.0040f690
lea eax, [ebp - 0x17e0]
mov byte [ebp - 4], 0xa
push eax
lea ecx, [ebp - 0x17cc]
lea edi, [ebp - 0x17dc]
call fcn.0040c3d0
push ecx
mov esi, esp
mov eax, dword [eax]
sub eax, 0x10
push eax
call fcn.0040f7f0
add esp, 4
lea ecx, [ebp - 0x17d4]
add eax, 0x10
mov edx, edi
mov dword [esi], eax
call fcn.00402790
add esp, 4
mov byte [ebp - 4], 0xc
or ebx, 0xffffffff
mov edx, dword [ebp - 0x17e0]
mov ecx, ebx
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x404af6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xd
mov ecx, ebx
mov edx, dword [ebp - 0x17dc]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x404b19
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x17d4]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x404caf
mov edi, dword [ebp - 0x17cc]
mov esi, dword [edi]
cmp esi, edi
je 0x404caf
lea ecx, [ecx]
mov eax, dword [esi + 0x10]
mov ecx, str.FileName
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x404b6e
test dx, dx
je 0x404b6a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x404b6e
add eax, 4
add ecx, 4
test dx, dx
jne 0x404b48
xor eax, eax
jmp 0x404b73
sbb eax, eax
or eax, 1
test eax, eax
sete al
test al, al
jne 0x404c65
call fcn.004311d4
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40434e
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x17e4], eax
mov byte [ebp - 4], 0xe
call fcn.004311d4
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40434e
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x17c4], eax
push 0x2f
push 0
mov byte [ebp - 4], 0xf
lea eax, [ebp - 0x17c4]
push dword [esi + 0x10]
push eax
call fcn.00431ced
push 0x2f
push 1
push dword [esi + 0x10]
lea eax, [ebp - 0x17e4]
push eax
call fcn.00431ced
mov ecx, dword [ebp - 0x17e4]
mov eax, dword [ebp - 0x17c4]
cmp dword [ecx - 0xc], 0
je 0x404c25
cmp dword [eax - 0xc], 0
je 0x404c25
push dword [ebp - 0x17d4]
push dword [esi + 0x14]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov eax, dword [ebp - 0x17c4]
lea edx, [eax - 0x10]
mov byte [ebp - 4], 0xe
lea eax, [edx + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x404c42
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xd
mov ecx, ebx
mov edx, dword [ebp - 0x17e4]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x404c65
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [esi + 0xd], 0
jne 0x404ca7
mov eax, dword [esi + 8]
cmp byte [eax + 0xd], 0
jne 0x404c8c
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0xd], 0
jne 0x404ca7
mov edi, edi
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0xd], 0
je 0x404c80
jmp 0x404ca7
mov eax, dword [esi + 4]
cmp byte [eax + 0xd], 0
jne 0x404ca5
cmp esi, dword [eax + 8]
jne 0x404ca5
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0xd], 0
je 0x404c95
mov esi, eax
cmp esi, edi
jne 0x404b40
mov byte [ebp - 4], 8
mov ecx, ebx
mov edx, dword [ebp - 0x17d4]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x404cd7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x404cd7
or ebx, 0xffffffff
mov eax, dword [ebp - 0x17d0]
inc eax
mov dword [ebp - 0x17d0], eax
cmp eax, 0xa
jge 0x404cf6
mov esi, dword [ebp - 0x17cc]
mov edi, eax
jmp 0x404930
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x17cc]
mov eax, dword [ebp - 0x17cc]
push eax
push dword [eax]
lea eax, [ebp - 0x17fc]
push eax
call fcn.0040d4b0
push dword [ebp - 0x17cc]
call fcn.00430ec0
add esp, 4
mov dword [ebp - 0x17cc], 0
mov dword [ebp - 0x17c8], 0
call fcn.0040dff0
mov esi, eax
mov dword [ebp - 0x17cc], esi
xor eax, eax
mov byte [ebp - 4], 0x10
push 0x206
push eax
mov word [ebp - 0x220], ax
lea eax, [ebp - 0x21e]
push eax
call fcn.0055c960
mov eax, dword [ebp - 0x1880]
add esp, 0xc
mov dword [ebp - 0x17e4], eax
mov ecx, 1
mov eax, dword [ebp - 0x1860]
mov dword [ebp - 0x1804], eax
mov eax, dword [ebp - 0x1870]
mov dword [ebp - 0x1808], eax
mov dword [ebp - 0x17dc], ecx
cmp ecx, 0xa
lea ecx, [ebp - 0x17cc]
jge 0x40593c
push dword [esi + 4]
call fcn.0040cdd0
mov eax, dword [ebp - 0x17cc]
push dword [ebp - 0x17dc]
push str.platform_json_d
mov dword [eax + 4], eax
mov eax, dword [ebp - 0x17cc]
mov dword [eax], eax
mov eax, dword [ebp - 0x17cc]
mov dword [eax + 8], eax
lea eax, [ebp - 0x220]
push eax
mov dword [ebp - 0x17c8], 0
call fcn.0040e0a0
add esp, 0xc
lea eax, [ebp - 0x17cc]
lea edx, [ebp - 0x428]
lea ecx, [ebp - 0x220]
push eax
call fcn.00402470
add esp, 4
test eax, eax
je 0x40592a
push dword [ebp - 0x180c]
lea ecx, [ebp - 0x17e8]
call fcn.0040f690
mov esi, dword [ebp - 0x17cc]
lea eax, [ebp - 0x17e8]
push eax
lea ecx, [ebp - 0x17cc]
call fcn.0040d570
cmp eax, dword [ebp - 0x17cc]
je 0x404ea2
mov edx, dword [eax + 0x10]
xor ecx, ecx
test edx, edx
setne cl
test ecx, ecx
jne 0x404e56
push 0x80004005
call fcn.0040fbb0
mov ecx, dword [ebp - 0x17e8]
mov edi, ecx
mov edi, edi
mov bx, word [edi]
cmp bx, word [edx]
jne 0x404e86
test bx, bx
je 0x404e82
mov bx, word [edi + 2]
cmp bx, word [edx + 2]
jne 0x404e86
add edi, 4
add edx, 4
test bx, bx
jne 0x404e60
xor edx, edx
jmp 0x404e8b
sbb edx, edx
or edx, 1
test edx, edx
sets dl
test dl, dl
jne 0x404ea8
mov dword [ebp - 0x17ec], eax
lea eax, [ebp - 0x17ec]
jmp 0x404eba
mov ecx, dword [ebp - 0x17e8]
mov eax, dword [ebp - 0x17cc]
mov dword [ebp - 0x1810], eax
lea eax, [ebp - 0x1810]
cmp dword [eax], esi
lea edx, [ecx - 0x10]
lea eax, [edx + 0xc]
setne bl
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x404ed9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test bl, bl
je 0x405927
mov dword [ebp - 0x10a4], 0xf
mov dword [ebp - 0x10a8], 0
mov byte [ebp - 0x10b8], 0
mov eax, dword [ebp - 0x183c]
lea ecx, [ebp - 0x17e0]
add eax, 4
mov byte [ebp - 4], 0x11
push eax
call fcn.0040f690
push str.FileName
lea ecx, [ebp - 0x17c4]
mov byte [ebp - 4], 0x12
call fcn.0040f690
lea eax, [ebp - 0x17c4]
mov byte [ebp - 4], 0x13
push eax
lea ecx, [ebp - 0x17cc]
call fcn.0040d570
mov esi, eax
cmp esi, dword [ebp - 0x17cc]
je 0x404f9b
mov ecx, dword [esi + 0x10]
xor eax, eax
test ecx, ecx
setne al
test eax, eax
jne 0x404f61
push 0x80004005
call fcn.0040fbb0
mov eax, dword [ebp - 0x17c4]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x404f8d
test dx, dx
je 0x404f89
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x404f8d
add eax, 4
add ecx, 4
test dx, dx
jne 0x404f67
xor eax, eax
jmp 0x404f92
sbb eax, eax
or eax, 1
test eax, eax
sets al
test al, al
je 0x404fd9
lea eax, [ebp - 0x17c4]
push ecx
mov dword [ebp - 0x1840], eax
lea eax, [ebp - 0x1840]
push eax
push ecx
lea ecx, [ebp - 0x17cc]
call fcn.0040e550
push eax
add eax, 0x10
lea ecx, [ebp - 0x17cc]
push eax
push esi
lea eax, [ebp - 0x1820]
push eax
call fcn.0040e620
mov esi, dword [ebp - 0x1820]
mov esi, dword [esi + 0x14]
push ecx
mov ebx, esp
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi - 4], 0
lea edx, [esi - 4]
mov ecx, eax
jl 0x405005
cmp ecx, dword [esi - 0x10]
jne 0x405005
lea edi, [esi - 0x10]
mov eax, 1
lock xadd dword [edx], eax
jmp 0x40503f
mov eax, dword [ecx]
push 2
push dword [esi - 0xc]
call dword [eax]
mov edi, eax
test edi, edi
jne 0x405019
call fcn.0040d130
mov eax, dword [esi - 0xc]
mov dword [edi + 4], eax
mov ecx, dword [esi - 0xc]
lea eax, [ecx*2 + 2]
push eax
lea eax, [ecx*2 + 2]
push esi
push eax
lea eax, [edi + 0x10]
push eax
call fcn.00558684
add esp, 0x10
lea eax, [edi + 0x10]
lea edx, [ebp - 0x17e0]
mov dword [ebx], eax
lea ecx, [ebp - 0x17d4]
call fcn.00402790
add esp, 4
mov byte [ebp - 4], 0x15
or ebx, 0xffffffff
mov edx, dword [ebp - 0x17c4]
mov ecx, ebx
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40507e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x16
mov ecx, ebx
mov edx, dword [ebp - 0x17e0]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4050a1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x17d4]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4058d7
mov esi, dword [ebp - 0x17d4]
lea ecx, [ebp - 0x104c]
xor edi, edi
call fcn.00431e36
push edi
push 0x10
push esi
lea ecx, [ebp - 0x104c]
mov byte [ebp - 4], 0x17
call fcn.004322d7
test eax, eax
je 0x405127
lea ecx, [ebp - 0x104c]
call fcn.004321f6
mov esi, eax
lea ecx, [ebp - 0x10b8]
push edi
push esi
call fcn.0040c290
cmp dword [ebp - 0x10a4], 0x10
lea ecx, [ebp - 0x10b8]
push esi
cmovae ecx, dword [ebp - 0x10b8]
push ecx
lea ecx, [ebp - 0x104c]
call fcn.004324ac
lea ecx, [ebp - 0x104c]
mov edi, eax
call fcn.00432103
lea ecx, [ebp - 0x104c]
mov byte [ebp - 4], 0x16
call fcn.00431eac
test edi, edi
je 0x4058d7
and dword [ebp - 0x1830], 0xfffffe00
mov dword [ebp - 0x182c], 0
lea eax, [ebp - 0x17d6]
mov byte [ebp - 4], 0x19
push eax
lea ecx, [ebp - 0x11a8]
mov word [ebp - 0x17d6], 0x100
call fcn.00410740
push 0xffffffffffffffff
xor esi, esi
mov byte [ebp - 4], 0x1b
push esi
lea eax, [ebp - 0x10b8]
mov dword [ebp - 0x17d0], esi
push eax
lea ecx, [ebp - 0x1180]
call fcn.0040ca60
cmp dword [ebp - 0x116c], 0x10
lea ecx, [ebp - 0x1180]
mov eax, dword [ebp - 0x1170]
lea edx, [ebp - 0x1838]
cmovae ecx, dword [ebp - 0x1180]
push ecx
add eax, ecx
push edx
push eax
push ecx
lea ecx, [ebp - 0x11a8]
call fcn.00410850
test al, al
je 0x4057f8
mov edi, dword [ebp - 0x17cc]
mov esi, dword [edi]
cmp esi, edi
je 0x4057ef
mov ecx, dword [ebp - 0x180c]
xor eax, eax
test ecx, ecx
setne al
test eax, eax
jne 0x4051f6
push 0x80004005
call fcn.0040fbb0
mov ebx, dword [esi + 0x10]
mov eax, ebx
jmp 0x405200
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x405226
test dx, dx
je 0x405222
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x405226
add eax, 4
add ecx, 4
test dx, dx
jne 0x405200
xor eax, eax
jmp 0x40522b
sbb eax, eax
or eax, 1
test eax, eax
sete al
test al, al
jne 0x40579a
push ebx
lea ecx, [ebp - 0x184c]
call fcn.0040c510
mov ebx, eax
mov byte [ebp - 4], 0x1c
mov ecx, dword [ebx]
cmp dword [ecx - 4], 1
jle 0x40525c
push dword [ecx - 0xc]
mov ecx, ebx
call fcn.0040c830
mov edx, dword [ebx]
mov dword [ebp - 0x103c], 0xf
mov dword [ebp - 0x1040], 0
mov byte [ebp - 0x1050], 0
cmp byte [edx], 0
jne 0x405282
xor ecx, ecx
jmp 0x405290
mov ecx, edx
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405287
sub ecx, ebx
push ecx
push edx
lea ecx, [ebp - 0x1050]
call fcn.0040d140
mov dword [ebp - 0x1060], 0xf
mov dword [ebp - 0x1064], 0
mov byte [ebp - 0x1074], 0
mov dword [ebp - 0x1058], 0
mov dword [ebp - 0x1124], 0xf
mov dword [ebp - 0x1128], 0
mov byte [ebp - 0x1138], 0
mov dword [ebp - 0x111c], 0
mov dword [ebp - 0x1104], 0xf
mov dword [ebp - 0x1108], 0
mov byte [ebp - 0x1118], 0
mov dword [ebp - 0x10fc], 0
mov dword [ebp - 0x10c4], 0xf
mov dword [ebp - 0x10c8], 0
mov byte [ebp - 0x10d8], 0
mov dword [ebp - 0x10bc], 0
mov dword [ebp - 0x10e4], 0xf
mov dword [ebp - 0x10e8], 0
mov byte [ebp - 0x10f8], 0
mov dword [ebp - 0x10dc], 0
lea eax, [ebp - 0x1074]
mov byte [ebp - 4], 0x22
push eax
lea eax, [ebp - 0x1138]
push eax
lea eax, [ebp - 0x1118]
push eax
lea eax, [ebp - 0x10d8]
push eax
lea eax, [ebp - 0x10f8]
push eax
lea eax, [ebp - 0x1050]
push eax
lea ecx, [ebp - 0x17f8]
call fcn.00414710
cmp dword [ebp - 0x10e4], 0x10
jb 0x4053a6
push dword [ebp - 0x10f8]
call fcn.00430ec0
add esp, 4
mov dword [ebp - 0x10e4], 0xf
mov dword [ebp - 0x10e8], 0
mov byte [ebp - 0x10f8], 0
cmp dword [ebp - 0x10c4], 0x10
jb 0x4053d8
push dword [ebp - 0x10d8]
call fcn.00430ec0
add esp, 4
mov dword [ebp - 0x10c4], 0xf
mov dword [ebp - 0x10c8], 0
mov byte [ebp - 0x10d8], 0
cmp dword [ebp - 0x1104], 0x10
jb 0x40540a
push dword [ebp - 0x1118]
call fcn.00430ec0
add esp, 4
mov dword [ebp - 0x1104], 0xf
mov dword [ebp - 0x1108], 0
mov byte [ebp - 0x1118], 0
cmp dword [ebp - 0x1124], 0x10
jb 0x40543c
push dword [ebp - 0x1138]
call fcn.00430ec0
add esp, 4
mov dword [ebp - 0x1124], 0xf
mov dword [ebp - 0x1128], 0
mov byte [ebp - 0x1138], 0
cmp dword [ebp - 0x1060], 0x10
jb 0x40546e
push dword [ebp - 0x1074]
call fcn.00430ec0
add esp, 4
mov dword [ebp - 0x1060], 0xf
mov dword [ebp - 0x1064], 0
mov byte [ebp - 0x1074], 0
cmp dword [ebp - 0x103c], 0x10
jb 0x4054a0
push dword [ebp - 0x1050]
call fcn.00430ec0
add esp, 4
mov dword [ebp - 0x103c], 0xf
mov dword [ebp - 0x1040], 0
mov byte [ebp - 0x1050], 0
mov byte [ebp - 4], 0x2a
or ecx, 0xffffffff
mov edx, dword [ebp - 0x184c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4054df
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push ecx
lea eax, [ebp - 0x1838]
push eax
lea eax, [ebp - 0x18a8]
push eax
lea ecx, [ebp - 0x17f8]
call fcn.00414ce0
lea ecx, [ebp - 0x18a8]
cmp byte [eax + 8], 0
setne bl
call fcn.004139a0
test bl, bl
je 0x405754
push 0x5c4088
lea ecx, [esi + 0x14]
call fcn.0040eff0
test eax, eax
jne 0x405587
mov eax, dword [ebp - 0x17e4]
and eax, 0xffffff05
mov dword [ebp - 0x187c], 0
or eax, 5
mov byte [ebp - 0x1888], 1
mov dword [ebp - 0x17e4], eax
mov dword [ebp - 0x1880], eax
lea eax, [ebp - 0x1838]
mov byte [ebp - 4], 0x2b
push eax
lea ecx, [ebp - 0x17f8]
call fcn.00414e80
lea ecx, [ebp - 0x1888]
push ecx
mov ecx, eax
call fcn.00413a50
lea ecx, [ebp - 0x1888]
mov byte [ebp - 4], 0x2a
call fcn.004139a0
jmp 0x40574e
push 0x5c4094
lea ecx, [esi + 0x14]
call fcn.0040eff0
test eax, eax
jne 0x4055fb
mov eax, dword [ebp - 0x1804]
and eax, 0xffffff05
mov dword [ebp - 0x185c], 0
or eax, 5
mov byte [ebp - 0x1868], 0
mov dword [ebp - 0x1804], eax
mov dword [ebp - 0x1860], eax
lea eax, [ebp - 0x1838]
mov byte [ebp - 4], 0x2c
push eax
lea ecx, [ebp - 0x17f8]
call fcn.00414e80
lea ecx, [ebp - 0x1868]
push ecx
mov ecx, eax
call fcn.00413a50
lea ecx, [ebp - 0x1868]
mov byte [ebp - 4], 0x2a
call fcn.004139a0
jmp 0x40574e
mov eax, dword [esi + 0x14]
cmp dword [eax - 0xc], 0
je 0x4056b8
jge 0x405614
push 0x80070057
call fcn.0040fbb0
movzx eax, word [eax]
push eax
call fcn.005596ad
add esp, 4
test eax, eax
je 0x4056b8
push dword [esi + 0x14]
lea ecx, [ebp - 0x1848]
call fcn.0040c510
mov ecx, eax
mov byte [ebp - 4], 0x2d
call fcn.0040c1d0
push eax
call fcn.005596e3
mov ecx, dword [ebp - 0x1808]
add esp, 4
and ecx, 0xffffff01
mov dword [ebp - 0x186c], 0
or ecx, 1
mov dword [ebp - 0x1878], eax
mov dword [ebp - 0x1808], ecx
mov dword [ebp - 0x1870], ecx
lea eax, [ebp - 0x1838]
mov byte [ebp - 4], 0x2e
push eax
lea ecx, [ebp - 0x17f8]
call fcn.00414e80
lea ecx, [ebp - 0x1878]
push ecx
mov ecx, eax
call fcn.00413a50
lea ecx, [ebp - 0x1878]
mov byte [ebp - 4], 0x2d
call fcn.004139a0
lea ecx, [ebp - 0x1848]
call fcn.0040c5b0
jmp 0x40574e
push dword [esi + 0x14]
lea ecx, [ebp - 0x1844]
call fcn.0040c510
push ecx
mov ecx, eax
mov byte [ebp - 4], 0x2f
call fcn.0040cfb0
push ecx
mov ecx, eax
call fcn.0040d030
mov ebx, eax
mov ecx, dword [ebx]
cmp dword [ecx - 4], 1
jle 0x4056ee
push dword [ecx - 0xc]
mov ecx, ebx
call fcn.0040c830
push dword [ebx]
lea ecx, [ebp - 0x1898]
call fcn.004137f0
mov ebx, eax
lea eax, [ebp - 0x1838]
mov byte [ebp - 4], 0x30
push eax
lea ecx, [ebp - 0x17f8]
call fcn.00414e80
push ebx
mov ecx, eax
call fcn.00413a50
lea ecx, [ebp - 0x1898]
mov byte [ebp - 4], 0x2f
call fcn.004139a0
mov byte [ebp - 4], 0x2a
or ecx, 0xffffffff
mov edx, dword [ebp - 0x1844]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40574e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
inc dword [ebp - 0x17d0]
mov byte [ebp - 4], 0x1b
mov eax, dword [ebp - 0x17f8]
test eax, eax
je 0x40579a
push dword [ebp - 0x17f4]
push eax
call fcn.0040d430
push dword [ebp - 0x17f8]
call fcn.00430ec0
add esp, 4
mov dword [ebp - 0x17f8], 0
mov dword [ebp - 0x17f4], 0
mov dword [ebp - 0x17f0], 0
cmp byte [esi + 0xd], 0
jne 0x4051d3
mov eax, dword [esi + 8]
cmp byte [eax + 0xd], 0
jne 0x4057cf
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0xd], 0
jne 0x4051d3
jmp 0x4057c0
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0xd], 0
je 0x4057c0
jmp 0x4051d3
mov eax, dword [esi + 4]
cmp byte [eax + 0xd], 0
jne 0x4057e8
cmp esi, dword [eax + 8]
jne 0x4057e8
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0xd], 0
je 0x4057d8
mov esi, eax
jmp 0x4051d3
mov esi, dword [ebp - 0x17d0]
or ebx, 0xffffffff
mov dword [ebp - 4], 0x1a
jmp 0x405847
test esi, esi
jle 0x4058bd
lea ecx, [ebp - 0x10a0]
call fcn.00417140
lea ecx, [ebp - 0x1838]
mov byte [ebp - 4], 0x32
mov edx, dword [eax]
push ecx
lea ecx, [ebp - 0x1050]
push ecx
mov ecx, eax
call dword [edx + 4]
mov byte [ebp - 4], 0x33
mov edx, eax
mov ecx, dword [ebp - 0x17d4]
call fcn.00402990
cmp dword [ebp - 0x103c], 0x10
jb 0x405897
push dword [ebp - 0x1050]
call fcn.00430ec0
add esp, 4
lea ecx, [ebp - 0x10a0]
mov dword [ebp - 0x103c], 0xf
mov dword [ebp - 0x1040], 0
mov byte [ebp - 0x1050], 0
call fcn.004022d0
lea ecx, [ebp - 0x11a8]
call fcn.00406280
lea ecx, [ebp - 0x1838]
mov byte [ebp - 4], 0x16
call fcn.004139a0
mov byte [ebp - 4], 0x11
mov ecx, ebx
mov edx, dword [ebp - 0x17d4]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4058fa
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x10
cmp dword [ebp - 0x10a4], 0x10
jb 0x40592a
push dword [ebp - 0x10b8]
call fcn.00430ec0
mov ecx, dword [ebp - 0x17dc]
add esp, 4
mov esi, dword [ebp - 0x17cc]
inc ecx
jmp 0x404d8f
or ebx, 0xffffffff
mov ecx, dword [ebp - 0x17dc]
mov esi, dword [ebp - 0x17cc]
inc ecx
jmp 0x404d8f
push esi
mov byte [ebp - 4], 4
lea eax, [ebp - 0x17fc]
push dword [esi]
push eax
call fcn.0040d4b0
push dword [ebp - 0x17cc]
call fcn.00430ec0
add esp, 4
mov dword [ebp - 0x17f4], 0
mov dword [ebp - 0x17f0], 0
call fcn.0040dff0
mov esi, eax
mov dword [ebp - 0x17f4], esi
xor eax, eax
mov byte [ebp - 4], 0x34
push 0x206
push eax
mov word [ebp - 0x220], ax
lea eax, [ebp - 0x21e]
push eax
call fcn.0055c960
mov edi, 1
add esp, 0xc
mov dword [ebp - 0x17e8], edi
jmp 0x4059b0
push dword [esi + 4]
lea ecx, [ebp - 0x17f4]
call fcn.0040cdd0
mov eax, dword [ebp - 0x17f4]
push edi
push str.platform_xml_d
mov dword [eax + 4], eax
mov eax, dword [ebp - 0x17f4]
mov dword [eax], eax
mov eax, dword [ebp - 0x17f4]
mov dword [eax + 8], eax
lea eax, [ebp - 0x220]
push eax
mov dword [ebp - 0x17f0], 0
call fcn.0040e0a0
add esp, 0xc
lea eax, [ebp - 0x17f4]
lea edx, [ebp - 0x428]
lea ecx, [ebp - 0x220]
push eax
call fcn.00402470
add esp, 4
test eax, eax
je 0x40617f
push str.FileName
lea ecx, [ebp - 0x1820]
call fcn.0040f690
mov esi, dword [ebp - 0x17f4]
lea eax, [ebp - 0x1820]
push eax
lea eax, [ebp - 0x17c8]
push eax
lea ecx, [ebp - 0x17f4]
call fcn.0040c460
mov edx, dword [ebp - 0x1820]
cmp dword [eax], esi
setne bl
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405a6e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test bl, bl
je 0x40617c
mov eax, dword [ebp - 0x183c]
lea ecx, [ebp - 0x1810]
add eax, 4
push eax
call fcn.0040f690
push dword [ebp - 0x180c]
lea ecx, [ebp - 0x1840]
mov byte [ebp - 4], 0x35
call fcn.0040f690
lea eax, [ebp - 0x1840]
mov byte [ebp - 4], 0x36
push eax
lea ecx, [ebp - 0x17f4]
lea ebx, [ebp - 0x1810]
call fcn.0040c3d0
push ecx
mov esi, esp
mov eax, dword [eax]
sub eax, 0x10
push eax
call fcn.0040f7f0
add esp, 4
lea ecx, [ebp - 0x17e4]
add eax, 0x10
mov edx, ebx
mov dword [esi], eax
call fcn.00402790
add esp, 4
mov byte [ebp - 4], 0x38
or ebx, 0xffffffff
mov edx, dword [ebp - 0x1840]
mov ecx, ebx
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405b08
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x39
mov ecx, ebx
mov edx, dword [ebp - 0x1810]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405b2b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x108c]
call fcn.00401bd0
mov byte [ebp - 4], 0x3a
push dword [ebp - 0x17e4]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40614c
test byte [ebp - 0x1064], 0x30
jne 0x40614c
push ecx
lea eax, [ebp - 0x1064]
push eax
push dword [ebp - 0x17e4]
lea edx, [ebp - 0x1088]
lea ecx, [ebp - 0x108c]
call fcn.0041ec60
add esp, 0xc
test al, al
je 0x40614c
lea ecx, [ebp - 0x108c]
call fcn.0041fd10
test al, al
je 0x40614c
mov ecx, dword [ebp - 0x17f4]
xor eax, eax
mov dword [ebp - 0x17d0], eax
mov dword [ebp - 0x17fc], ecx
mov eax, dword [ecx]
mov dword [ebp - 0x17ec], eax
cmp eax, ecx
je 0x40614c
lea esp, [esp]
lea ebx, [eax + 0x10]
push str.FileName
push ebx
mov dword [ebp - 0x17e0], ebx
call fcn.0040f040
add esp, 8
test al, al
jne 0x4060f1
call fcn.004311d4
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40434e
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x1808], eax
mov byte [ebp - 4], 0x3b
call fcn.004311d4
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40434e
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x17dc], edi
push ebx
lea ecx, [ebp - 0x1808]
mov byte [ebp - 4], 0x3c
call fcn.0040f0a0
push 0x40
push dword [ebx]
call fcn.00559a33
mov esi, eax
add esp, 8
test esi, esi
je 0x405d50
sub esi, dword [ebx]
sar esi, 1
test esi, esi
jle 0x405d50
push esi
lea eax, [ebp - 0x1850]
mov ecx, ebx
push eax
call fcn.0040c090
mov ebx, eax
push 0x5c40c0
push dword [ebx]
call fcn.005599f1
add esp, 8
test eax, eax
jne 0x405c86
or eax, 0xffffffff
jmp 0x405c8a
sub eax, dword [ebx]
sar eax, 1
mov edx, dword [ebp - 0x1850]
cmp eax, 0xffffffff
sete bl
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405cb0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test bl, bl
je 0x405d50
mov ebx, dword [ebp - 0x17e0]
lea eax, [esi + 1]
push eax
lea eax, [ebp - 0x1844]
mov ecx, ebx
push eax
call fcn.0040c090
push eax
lea ecx, [ebp - 0x17dc]
mov byte [ebp - 4], 0x3d
call fcn.0040f0a0
mov byte [ebp - 4], 0x3c
or edi, 0xffffffff
mov edx, dword [ebp - 0x1844]
mov ecx, edi
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405d06
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push esi
push 0
lea eax, [ebp - 0x1848]
mov ecx, ebx
push eax
call fcn.0040f370
push eax
lea ecx, [ebp - 0x1808]
mov byte [ebp - 4], 0x3e
call fcn.0040f0a0
mov byte [ebp - 4], 0x3c
mov ecx, edi
mov edx, dword [ebp - 0x1848]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405d4a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x17dc]
mov dword [ebp - 0x1834], 0
mov dword [ebp - 0x1830], 0
mov dword [ebp - 0x182c], 0
mov byte [ebp - 4], 0x3f
lea edx, [ebp - 0x1834]
mov ebx, dword [ebp - 0x1808]
mov ecx, ebx
push 0x2f
call fcn.0042a940
mov ecx, dword [ebp - 0x1830]
xor eax, eax
xor edx, edx
mov dword [ebp - 0x1084], 0
add esp, 4
mov dword [ebp - 0x1080], eax
mov dword [ebp - 0x107c], eax
mov dword [ebp - 0x106c], eax
mov dword [ebp - 0x1068], eax
mov dword [ebp - 0x1070], eax
mov dword [ebp - 0x17d8], edx
test ecx, ecx
jle 0x406030
lea ebx, [ebx]
mov dword [ebp - 0x1804], 0
test edx, edx
js 0x406196
cmp edx, ecx
jge 0x406196
mov eax, dword [ebp - 0x1834]
mov eax, dword [eax + edx*4]
sub eax, 0x10
push eax
call fcn.0040f7f0
add esp, 4
lea esi, [eax + 0x10]
mov dword [ebp - 0x17c4], esi
mov byte [ebp - 4], 0x40
cmp dword [esi - 0xc], 0
jg 0x405e17
or eax, 0xffffffff
jmp 0x405e2f
push 0x5b
push esi
call fcn.00559943
add esp, 8
test eax, eax
jne 0x405e2b
or eax, 0xffffffff
jmp 0x405e2f
sub eax, esi
sar eax, 1
cmp dword [esi - 0xc], 0
mov dword [ebp - 0x17d4], eax
jg 0x405e40
or eax, 0xffffffff
jmp 0x405e58
push 0x5d
push esi
call fcn.00559943
add esp, 8
test eax, eax
jne 0x405e54
or eax, 0xffffffff
jmp 0x405e58
sub eax, esi
sar eax, 1
mov ecx, dword [ebp - 0x17d4]
test ecx, ecx
js 0x405f3e
cmp ecx, eax
jge 0x405f3e
sub eax, ecx
dec eax
push eax
lea eax, [ecx + 1]
push eax
lea eax, [ebp - 0x184c]
push eax
lea ecx, [ebp - 0x17c4]
call fcn.0040f370
mov esi, eax
mov byte [ebp - 4], 0x41
mov ecx, dword [esi]
cmp dword [ecx - 4], 1
jle 0x405ea0
push dword [ecx - 0xc]
mov ecx, esi
call fcn.0040f8c0
push dword [esi]
call fcn.0055961d
mov esi, eax
mov byte [ebp - 4], 0x40
mov eax, dword [ebp - 0x184c]
add esp, 4
add eax, 0xfffffff0
mov dword [ebp - 0x1804], esi
mov dword [ebp - 0x1854], eax
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405ee1
mov ecx, dword [eax]
push dword [ebp - 0x1854]
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x17d4]
lea ecx, [ebp - 0x17c4]
push eax
push 0
lea eax, [ebp - 0x1858]
push eax
call fcn.0040f370
push eax
lea ecx, [ebp - 0x17c4]
mov byte [ebp - 4], 0x42
call fcn.0040f0a0
mov byte [ebp - 4], 0x40
or ecx, 0xffffffff
mov edx, dword [ebp - 0x1858]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405f30
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
mov esi, dword [ebp - 0x17c4]
js 0x406064
cmp dword [esi - 0xc], 0
je 0x406064
cmp dword [ebp - 0x1804], 0
mov dword [ebp - 0x17d4], 0
jl 0x405f8d
jmp 0x405f60
push ecx
mov eax, esp
lea ecx, [ebp - 0x108c]
mov dword [eax], esi
call fcn.0041ef90
test al, al
je 0x406064
mov eax, dword [ebp - 0x17d4]
inc eax
mov dword [ebp - 0x17d4], eax
cmp eax, dword [ebp - 0x1804]
jle 0x405f60
mov edx, dword [ebp - 0x17d8]
inc edx
mov dword [ebp - 0x17d8], edx
cmp edx, dword [ebp - 0x1830]
jne 0x405fa8
cmp dword [edi - 0xc], 0
jne 0x405ff8
mov eax, dword [ebp - 0x1080]
test eax, eax
je 0x405ff8
cmp dword [ebp - 0x1070], 1
jne 0x405ff8
mov ecx, dword [ebp - 0x107c]
mov dword [ebp - 0x1084], eax
xor eax, eax
test ecx, ecx
mov dword [ebp - 0x1080], ecx
mov dword [ebp - 0x107c], 0
setne al
mov dword [ebp - 0x106c], 0
mov dword [ebp - 0x1068], 0
mov dword [ebp - 0x1070], eax
add esi, 0xfffffff0
mov byte [ebp - 4], 0x3f
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40601c
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x17d8]
mov ecx, dword [ebp - 0x1830]
cmp edx, ecx
jl 0x405dd0
mov eax, dword [ebp - 0x1080]
cmp dword [edi - 0xc], 0
jne 0x406084
push ecx
lea ecx, [ebp - 0x108c]
call fcn.0041fa50
cmp eax, 2
jne 0x4060a9
push ecx
mov ecx, dword [ebp - 0x17e0]
push dword [ecx + 4]
lea ecx, [ebp - 0x108c]
push dword [ebp - 0x1080]
call fcn.00420f60
jmp 0x40609c
add esi, 0xfffffff0
mov byte [ebp - 4], 0x3f
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4060a9
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4060a9
mov ecx, dword [ebp - 0x17e0]
push 0
push dword [ecx + 4]
lea ecx, [ebp - 0x108c]
push edi
push eax
call fcn.00420800
xor ecx, ecx
test al, al
setne cl
add dword [ebp - 0x17d0], ecx
lea ecx, [ebp - 0x1834]
call fcn.0040e110
add edi, 0xfffffff0
mov byte [ebp - 4], 0x3b
or esi, 0xffffffff
mov ecx, esi
lea eax, [edi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4060d4
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
add ebx, 0xfffffff0
mov byte [ebp - 4], 0x3a
mov ecx, esi
lea eax, [ebx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4060f1
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x17ec]
call fcn.0040d5f0
mov eax, dword [ebp - 0x17ec]
cmp eax, dword [ebp - 0x17fc]
jne 0x405bc0
mov eax, dword [ebp - 0x17d0]
test eax, eax
jle 0x406143
test byte [ebp - 0x1064], 0x30
jne 0x406143
push ecx
lea eax, [ebp - 0x1064]
push eax
push dword [ebp - 0x17e4]
lea edx, [ebp - 0x1088]
lea ecx, [ebp - 0x108c]
call fcn.0041ee10
add esp, 0xc
mov edi, dword [ebp - 0x17e8]
or ebx, 0xffffffff
lea ecx, [ebp - 0x108c]
call fcn.0041eab0
mov byte [ebp - 4], 0x34
mov ecx, ebx
mov edx, dword [ebp - 0x17e4]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40617f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40617f
or ebx, 0xffffffff
inc edi
mov dword [ebp - 0x17e8], edi
cmp edi, 0xa
jge 0x4061a2
mov esi, dword [ebp - 0x17f4]
jmp 0x4059b0
push 1
push 0xc000008c
call fcn.0040eea0
mov eax, dword [ebp - 0x17f4]
lea ecx, [ebp - 0x17f4]
push eax
push dword [eax]
lea eax, [ebp - 0x17c8]
push eax
call fcn.0040d4b0
push dword [ebp - 0x17f4]
call fcn.00430ec0
mov eax, dword [ebp - 0x181c]
add esp, 4
test eax, eax
je 0x4061de
push eax
call fcn.00430ec0
add esp, 4
mov byte [ebp - 4], 0
mov ecx, ebx
mov edx, dword [ebp - 0x1824]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x406201
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x1800]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x406225
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00557f7f
mov esp, ebp
pop ebp
ret