Function at 0x40f050
Capabilities:
Accept command line arguments
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46b564
mov eax, dword fs:[0]
push eax
sub esp, 0x344
mov eax, dword [0x4961ec]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x2b8], ebx
mov dword [ebp - 0x2b4], 0
mov dword [ebp - 4], 0
mov dword [ebx], 0
call fcn.00404600
mov ecx, eax
test ecx, ecx
je 0x40fb12
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebx], eax
push 0x208
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 0
push 0
push eax
mov dword [ebp - 0x2b4], 1
call fcn.00436710
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov esi, dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x218]
push eax
call esi
lea eax, [ebp - 0x218]
push eax
call esi
push str.debug_url.set
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
or edi, 0xffffffff
test eax, eax
je 0x40f430
call fcn.00404600
mov ecx, eax
test ecx, ecx
je 0x40fb1c
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x26c], eax
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 1
push eax
lea ecx, [ebp - 0x26c]
call fcn.00404390
test al, al
jne 0x40f199
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40f177
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x26c]
call fcn.00405170
mov dword [ebp - 4], 2
call fcn.00404600
mov ecx, eax
test ecx, ecx
je 0x40fb26
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x27c], eax
push 0x4768c4
lea ecx, [ebp - 0x27c]
mov byte [ebp - 4], 3
call fcn.00404390
test al, al
jne 0x40f1e7
push 0
push 0x4768c4
lea ecx, [ebp - 0x27c]
call fcn.00405170
mov byte [ebp - 4], 4
call fcn.00404600
mov ecx, eax
test ecx, ecx
je 0x40fb30
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x278], eax
push str.WebHostPage
lea ecx, [ebp - 0x278]
mov byte [ebp - 4], 5
call fcn.00404390
test al, al
jne 0x40f232
push 0xb
push str.WebHostPage
lea ecx, [ebp - 0x278]
call fcn.00405170
mov byte [ebp - 4], 6
call fcn.00404600
mov ecx, eax
test ecx, ecx
je 0x40fb3a
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x274], eax
push str.DebugUrl
lea ecx, [ebp - 0x274]
mov byte [ebp - 4], 7
call fcn.00404390
test al, al
jne 0x40f27d
push 8
push str.DebugUrl
lea ecx, [ebp - 0x274]
call fcn.00405170
lea eax, [ebp - 0x26c]
mov byte [ebp - 4], 8
push eax
lea eax, [ebp - 0x27c]
push eax
lea eax, [ebp - 0x278]
push eax
lea eax, [ebp - 0x274]
push eax
lea eax, [ebp - 0x298]
push eax
call fcn.00426d70
add esp, 0x14
mov esi, dword [eax]
mov byte [ebp - 4], 9
call fcn.00404600
mov ecx, eax
test ecx, ecx
je 0x40fb44
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x268], eax
push esi
lea ecx, [ebp - 0x268]
mov byte [ebp - 4], 0xa
call fcn.00404390
test al, al
jne 0x40f30c
test esi, esi
jne 0x40f2eb
xor ecx, ecx
jmp 0x40f2ff
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40f2f0
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x268]
call fcn.00405170
mov edx, dword [ebp - 0x298]
mov eax, edi
mov byte [ebp - 4], 0xc
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40f32d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x274]
mov eax, edi
mov byte [ebp - 4], 0xd
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40f34e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x278]
mov eax, edi
mov byte [ebp - 4], 0xe
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40f36f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x27c]
mov eax, edi
mov byte [ebp - 4], 0xf
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40f390
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x26c]
mov eax, edi
mov byte [ebp - 4], 0x10
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40f3b1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x268]
mov edx, dword [esi - 0xc]
test edx, edx
je 0x40f415
mov edi, dword [ebx]
lea ecx, [esi - 0x10]
sub edi, 0x10
cmp ecx, edi
je 0x40f412
cmp dword [edi + 0xc], 0
jl 0x40f409
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x40f409
push ecx
call fcn.004044d0
add esp, 4
mov dword [ebp - 0x270], eax
or ecx, 0xffffffff
lea edx, [edi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40f402
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x270]
add eax, 0x10
mov dword [ebx], eax
jmp 0x40f412
push edx
push esi
mov ecx, ebx
call fcn.00405170
or edi, 0xffffffff
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40f430
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebx]
cmp dword [eax - 0xc], 0
jne 0x40faf4
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x21c], 0
push eax
call fcn.0040e5f0
push 0x30
lea eax, [ebp - 0x264]
mov dword [ebp - 4], 0x11
push 0
push eax
call fcn.00436710
add esp, 0x10
lea ecx, [ebp - 0x264]
call fcn.00420420
mov byte [ebp - 4], 0x12
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edx, eax
mov dword [ebp - 0x284], 0
mov ecx, edx
mov dword [ebp - 0x280], 7
xor eax, eax
mov word [ebp - 0x294], ax
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40f4a5
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x294]
call fcn.004059e0
lea eax, [ebp - 0x294]
mov byte [ebp - 4], 0x13
push eax
lea ecx, [ebp - 0x264]
call fcn.00420df0
mov edx, dword [ebp - 0x280]
mov byte [ebp - 4], 0x12
cmp edx, 8
jb 0x40f51b
mov ecx, dword [ebp - 0x294]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40f511
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fb4e
push edx
push ecx
call fcn.0042ec84
add esp, 8
xor eax, eax
mov dword [ebp - 0x224], 0
push eax
push 0x4768f4
lea ecx, [ebp - 0x234]
mov dword [ebp - 0x220], 7
mov word [ebp - 0x234], ax
call fcn.004059e0
mov edx, dword [0x49607c]
xor eax, eax
mov ecx, edx
mov byte [ebp - 4], 0x14
mov dword [ebp - 0x284], 0
mov dword [ebp - 0x280], 7
mov word [ebp - 0x294], ax
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40f575
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x294]
call fcn.004059e0
lea eax, [ebp - 0x234]
mov byte [ebp - 4], 0x15
push eax
lea eax, [ebp - 0x294]
push eax
lea ecx, [ebp - 0x264]
call fcn.00420c10
mov edx, dword [ebp - 0x280]
mov byte [ebp - 4], 0x14
cmp edx, 8
jb 0x40f5f2
mov ecx, dword [ebp - 0x294]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40f5e8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fb53
push edx
push ecx
call fcn.0042ec84
add esp, 8
mov eax, dword [ebx]
mov esi, str.zip:__
sub esi, eax
mov dword [ebp - 0x26c], str.zip:__
push 6
push str.zip:__
mov eax, dword [eax - 0xc]
sar esi, 1
mov dword [ebp - 0x268], eax
call fcn.0043cbf1
mov edx, eax
mov ecx, 0x7fffffff
mov eax, dword [ebp - 0x268]
sub ecx, edx
add esp, 8
mov dword [ebp - 0x270], edx
cmp ecx, eax
jl 0x40fb58
add edx, eax
js 0x40fb62
mov eax, dword [ebx]
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, edx
or eax, ecx
jge 0x40f65f
push edx
mov ecx, ebx
call fcn.00405030
mov ecx, dword [ebp - 0x268]
mov edx, dword [ebx]
cmp esi, ecx
ja 0x40f674
lea eax, [edx + esi*2]
mov dword [ebp - 0x26c], eax
mov esi, dword [ebp - 0x270]
lea eax, [esi + esi]
push eax
push dword [ebp - 0x26c]
push eax
lea eax, [edx + ecx*2]
push eax
call fcn.00406b40
mov edx, dword [ebx]
add esp, 0x10
mov ecx, dword [ebp - 0x268]
add ecx, esi
cmp ecx, dword [edx - 8]
jg 0x40fb58
mov dword [edx - 0xc], ecx
lea esi, [ebp - 0x234]
mov eax, dword [ebx]
xor edx, edx
mov word [eax + ecx*2], dx
mov ecx, 1
cmp dword [ebp - 0x220], 8
mov eax, dword [ebp - 0x224]
mov edx, eax
cmovae esi, dword [ebp - 0x234]
cmp eax, 1
cmova edx, ecx
mov ecx, 0x476908
test edx, edx
je 0x40f6fc
sub esi, ecx
mov ax, word [esi + ecx]
cmp ax, word [ecx]
jne 0x40f7c3
add ecx, 2
sub edx, 1
jne 0x40f6e1
mov eax, dword [ebp - 0x224]
cmp eax, 1
jb 0x40f7c3
ja 0x40f7c3
mov eax, dword [ebx]
mov ecx, 0x47690c
sub ecx, eax
mov dword [ebp - 0x268], 0x47690c
sar ecx, 1
push 4
mov esi, dword [eax - 0xc]
push 0x47690c
mov dword [ebp - 0x270], ecx
mov dword [ebp - 0x298], esi
call fcn.0043cbf1
mov ecx, 0x7fffffff
mov dword [ebp - 0x26c], eax
sub ecx, eax
add esp, 8
cmp ecx, esi
jl 0x40fb6c
add esi, eax
js 0x40fb76
mov eax, dword [ebx]
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, esi
or eax, ecx
jge 0x40f776
push esi
mov ecx, ebx
call fcn.00405030
mov eax, dword [ebp - 0x270]
mov ecx, dword [ebp - 0x298]
mov edx, dword [ebx]
cmp eax, ecx
ja 0x40f791
lea eax, [edx + eax*2]
mov dword [ebp - 0x268], eax
mov eax, dword [ebp - 0x26c]
add eax, eax
push eax
push dword [ebp - 0x268]
push eax
lea eax, [edx + ecx*2]
push eax
call fcn.00406b40
mov eax, dword [ebx]
add esp, 0x10
cmp esi, dword [eax - 8]
jg 0x40fb58
mov dword [eax - 0xc], esi
xor ecx, ecx
mov eax, dword [ebx]
mov word [eax + esi*2], cx
push dword [ebp - 0x21c]
push str.0CA42E8A_E041_492E_B7C2_703494DED02F_s_build_index.html
push ebx
call fcn.0040e050
add esp, 0xc
call fcn.0041e920
mov ecx, eax
push 0
mov edx, dword [eax]
mov eax, dword [edx + 8]
call eax
movzx eax, al
sub eax, 1
jne 0x40f94a
push 0x46
push 0x476990
lea ecx, [ebp - 0x2b0]
mov dword [ebp - 0x2a0], eax
mov dword [ebp - 0x29c], 0xf
mov byte [ebp - 0x2b0], al
call fcn.004058e0
push 3
push 0x47698c
lea ecx, [ebp - 0x294]
mov byte [ebp - 4], 0x16
mov dword [ebp - 0x284], 0
mov dword [ebp - 0x280], 0xf
mov byte [ebp - 0x294], 0
call fcn.004058e0
mov byte [ebp - 4], 0x17
call fcn.0041e920
mov edi, eax
lea ecx, [ebp - 0x350]
push 0x5a
lea eax, [ebp - 0x2b0]
push eax
lea eax, [ebp - 0x294]
push eax
call fcn.00402eb0
mov esi, eax
push str.decode_path:
push esi
mov byte [ebp - 4], 0x18
call fcn.00406be0
mov eax, dword [ebp - 0x21c]
mov ecx, 0x4745e0
test eax, eax
cmovne ecx, eax
push ecx
push esi
call fcn.00406be0
mov eax, dword [edi]
add esp, 0x10
mov ecx, edi
push esi
call dword [eax + 0x1c]
lea ecx, [ebp - 0x350]
call fcn.00403e10
mov edx, dword [ebp - 0x280]
mov byte [ebp - 4], 0x16
cmp edx, 0x10
jb 0x40f8ee
mov ecx, dword [ebp - 0x294]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40f8e4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fb80
push edx
push ecx
call fcn.0042ec84
add esp, 8
mov edx, dword [ebp - 0x29c]
mov dword [ebp - 0x284], 0
mov dword [ebp - 0x280], 0xf
mov byte [ebp - 0x294], 0
mov byte [ebp - 4], 0x14
cmp edx, 0x10
jb 0x40f947
mov ecx, dword [ebp - 0x2b0]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40f93d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fb85
push edx
push ecx
call fcn.0042ec84
add esp, 8
or edi, 0xffffffff
push dword [ebp - 0x21c]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40fa69
call fcn.0041e920
mov ecx, eax
push 0
mov edx, dword [eax]
mov eax, dword [edx + 8]
call eax
movzx eax, al
sub eax, 1
jne 0x40fa36
push 0x46
push 0x4769f8
lea ecx, [ebp - 0x294]
mov dword [ebp - 0x284], eax
mov dword [ebp - 0x280], 0xf
mov byte [ebp - 0x294], al
call fcn.004058e0
push 3
push 0x4769f4
lea ecx, [ebp - 0x2b0]
mov byte [ebp - 4], 0x19
mov dword [ebp - 0x2a0], 0
mov dword [ebp - 0x29c], 0xf
mov byte [ebp - 0x2b0], 0
call fcn.004058e0
mov byte [ebp - 4], 0x1a
call fcn.0041e920
mov edi, eax
lea ecx, [ebp - 0x350]
push 0x5c
lea eax, [ebp - 0x294]
push eax
lea eax, [ebp - 0x2b0]
push eax
call fcn.00402eb0
mov esi, eax
push str.path_not_exist
push esi
mov byte [ebp - 4], 0x1b
call fcn.00406be0
mov edx, dword [edi]
add esp, 8
mov ecx, edi
push esi
call dword [edx + 0x1c]
lea ecx, [ebp - 0x350]
call fcn.00403e10
lea ecx, [ebp - 0x2b0]
call fcn.00403870
lea ecx, [ebp - 0x294]
call fcn.00403870
lea ecx, [ebp - 0x234]
call fcn.004038c0
lea ecx, [ebp - 0x264]
call fcn.00420480
mov edx, dword [ebp - 0x21c]
or ecx, 0xffffffff
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jmp 0x40faea
mov edx, dword [ebp - 0x220]
mov byte [ebp - 4], 0x12
cmp edx, 8
jb 0x40faad
mov ecx, dword [ebp - 0x234]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40faa3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fb8a
push edx
push ecx
call fcn.0042ec84
add esp, 8
xor eax, eax
mov dword [ebp - 0x224], 0
lea ecx, [ebp - 0x264]
mov dword [ebp - 0x220], 7
mov word [ebp - 0x234], ax
call fcn.00420480
mov edx, dword [ebp - 0x21c]
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x40faf4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042ef2c
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00404370
push 0x80004005
call fcn.00404370
push 0x80004005
call fcn.00404370
push 0x80004005
call fcn.00404370
push 0x80004005
call fcn.00404370
push 0x80004005
call fcn.00404370
call fcn.00439bd8
call fcn.00439bd8
push 0x80070057
call fcn.00404370
push 0x80070057
call fcn.00404370
push 0x80070057
call fcn.00404370
push 0x80070057
call fcn.00404370
call fcn.00439bd8
call fcn.00439bd8
call fcn.00439bd8
int3