Function at 0x408040
Capabilities:
Delete file
Print debug messages

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x452fae
mov eax, dword fs:[0]
push eax
sub esp, 0x468
mov eax, dword [0x46a860]
xor eax, esp
mov dword [esp + 0x460], eax
push ebx
push esi
push edi
mov eax, dword [0x46a860]
xor eax, esp
push eax
lea eax, [esp + 0x478]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x18], 0
mov eax, dword [ebx + 0x2c]
test eax, eax
mov dword [esp + 0x20], ebx
je 0x40809c
mov eax, dword [eax]
call fcn.00405080
cmp dword [ebx + 0x28], 0
je 0x4087b3
mov eax, dword [ebx + 0x20]
push 0x2000
push 4
push eax
call fcn.0041502e
push 0xffff
mov esi, eax
mov eax, dword [ebx + 0x18]
push 4
push eax
mov dword [esp + 0x5c], esi
call fcn.0041502e
push 0xffff
mov edi, eax
mov eax, dword [ebx + 0x1c]
push 4
push eax
mov dword [esp + 0x64], edi
call fcn.0041502e
push 0xffff
mov dword [esp + 0x28], eax
mov eax, dword [ebx + 0x24]
push 4
push eax
call fcn.0041502e
cmp esi, 0xffffffff
mov dword [esp + 0x34], eax
je 0x4087af
cmp edi, 0xffffffff
je 0x4087af
mov ecx, dword [esp + 0x24]
cmp ecx, 0xffffffff
je 0x4087af
cmp eax, 0xffffffff
je 0x4087af
test esi, esi
je 0x4087af
test edi, edi
je 0x4087af
test ecx, ecx
je 0x4087af
test eax, eax
je 0x4087af
cmp dword [ebx + 0x38], 2
jne 0x408696
mov dword [esp + 0x2c], 0
mov eax, dword [ebx + 0x34]
push eax
lea edi, [esp + 0x2c]
mov dword [esp + 0x2c], 0
call fcn.00404f10
cmp dword [esp + 0x28], 0
je 0x408696
push 0x200
lea eax, [esp + 0x70]
push 0
push eax
call fcn.004377f0
add esp, 0xc
push 0x200
lea ecx, [esp + 0x270]
push 0
push ecx
call fcn.004377f0
mov edx, dword [ebx + 0xc]
add esp, 0xc
push edx
lea eax, [esp + 0x70]
push 0x200
push eax
call fcn.004367c6
mov esi, dword [esp + 0x34]
mov ecx, dword [esi + 0x14]
add esp, 0xc
push ecx
lea edx, [esp + 0x70]
push 0x200
push edx
call fcn.00436984
mov esi, dword [esi + 0x10]
add esp, 0xc
mov edi, str.Launcher.exe
mov ecx, 0xd
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x4081f9
push str..new
lea ecx, [esp + 0x70]
push 0x200
push ecx
call fcn.00436984
add esp, 0xc
mov edx, dword [ebx + 0x10]
push edx
lea eax, [esp + 0x270]
push 0x200
push eax
call fcn.004367c6
mov esi, dword [esp + 0x34]
mov ecx, dword [esi + 0x14]
add esp, 0xc
push ecx
lea edx, [esp + 0x270]
push 0x200
push edx
call fcn.00436984
mov eax, dword [esi + 0x14]
add esp, 0xc
push eax
lea ecx, [esp + 0x20]
call fcn.004029f0
lea edi, [esp + 0x1c]
mov dword [esp + 0x480], 0
call fcn.00408a90
mov ebx, edi
call fcn.004089e0
mov ecx, edi
push ecx
call fcn.00408930
cmp dword [esi], 1
je 0x408641
push 4
lea edx, [esp + 0x48]
push edx
mov ecx, edi
call fcn.004045f0
push str..map
push eax
call fcn.00408af0
add esp, 8
lea ecx, [esp + 0x44]
mov bl, al
call fcn.00402ae0
xor edi, edi
test bl, bl
jne 0x408600
push 4
lea eax, [esp + 0x68]
push eax
lea ecx, [esp + 0x24]
call fcn.004045f0
mov byte [esp + 0x480], 1
mov ebx, dword [esp + 0x18]
push str..dds
or ebx, 1
push eax
mov dword [esp + 0x20], ebx
call fcn.00408af0
add esp, 8
test al, al
jne 0x4082fc
push 4
lea ecx, [esp + 0x64]
push ecx
lea ecx, [esp + 0x24]
call fcn.004045f0
push str..tga
or ebx, 2
push eax
mov dword [esp + 0x20], ebx
call fcn.00408af0
add esp, 8
test al, al
mov byte [esp + 0x17], 0
je 0x408301
mov byte [esp + 0x17], 1
test bl, 2
je 0x408316
and ebx, 0xfffffffd
lea ecx, [esp + 0x60]
mov dword [esp + 0x18], ebx
call fcn.00402ae0
test bl, 1
mov dword [esp + 0x480], edi
je 0x408332
and ebx, 0xfffffffe
lea ecx, [esp + 0x64]
mov dword [esp + 0x18], ebx
call fcn.00402ae0
cmp byte [esp + 0x17], 0
jne 0x408600
push 5
lea edx, [esp + 0x6c]
push edx
lea ecx, [esp + 0x24]
call fcn.004045f0
push str..pwm3
mov byte [esp + 0x484], 2
or ebx, 4
push eax
mov dword [esp + 0x20], ebx
call fcn.00408af0
add esp, 8
test al, al
jne 0x408408
push 4
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x24]
call fcn.004045f0
push str..m4f
mov dword [esp + 0x484], 3
or ebx, 8
push eax
mov dword [esp + 0x20], ebx
call fcn.00408af0
add esp, 8
test al, al
jne 0x408408
push 9
lea ecx, [esp + 0x60]
push ecx
lea ecx, [esp + 0x24]
call fcn.004045f0
push str..pwm3.cfg
mov dword [esp + 0x484], 4
or ebx, 0x10
push eax
mov dword [esp + 0x20], ebx
call fcn.00408af0
add esp, 8
test al, al
jne 0x408408
push 4
lea edx, [esp + 0x3c]
push edx
lea ecx, [esp + 0x24]
call fcn.004045f0
push str..trk
or ebx, 0x20
push eax
mov dword [esp + 0x20], ebx
call fcn.00408af0
add esp, 8
test al, al
mov byte [esp + 0x17], 0
je 0x40840d
mov byte [esp + 0x17], 1
test bl, 0x20
je 0x408422
and ebx, 0xffffffdf
lea ecx, [esp + 0x38]
mov dword [esp + 0x18], ebx
call fcn.00402ae0
test bl, 0x10
je 0x408437
and ebx, 0xffffffef
lea ecx, [esp + 0x5c]
mov dword [esp + 0x18], ebx
call fcn.00402ae0
test bl, 8
je 0x40844c
and ebx, 0xfffffff7
lea ecx, [esp + 0x4c]
mov dword [esp + 0x18], ebx
call fcn.00402ae0
test bl, 4
mov dword [esp + 0x480], edi
je 0x408468
and ebx, 0xfffffffb
lea ecx, [esp + 0x68]
mov dword [esp + 0x18], ebx
call fcn.00402ae0
cmp byte [esp + 0x17], 0
jne 0x408600
push 7
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x24]
call fcn.004045f0
push str..string
mov byte [esp + 0x484], 5
or ebx, 0x40
push eax
mov dword [esp + 0x20], ebx
call fcn.00408af0
add esp, 8
test al, al
jne 0x408547
push 5
lea ecx, [esp + 0x44]
push ecx
lea ecx, [esp + 0x24]
call fcn.004045f0
push str..task
mov dword [esp + 0x484], 6
or ebx, 0x80
push eax
mov dword [esp + 0x20], ebx
call fcn.00408af0
add esp, 8
test al, al
jne 0x408547
push 4
lea edx, [esp + 0x40]
push edx
lea ecx, [esp + 0x24]
call fcn.004045f0
push str..str
mov dword [esp + 0x484], 7
or ebx, 0x100
push eax
mov dword [esp + 0x20], ebx
call fcn.00408af0
add esp, 8
test al, al
jne 0x408547
push 4
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x24]
call fcn.004045f0
push str..tas
or ebx, 0x200
push eax
mov dword [esp + 0x20], ebx
call fcn.00408af0
add esp, 8
test al, al
mov byte [esp + 0x17], 0
je 0x40854c
mov byte [esp + 0x17], 1
test ebx, 0x200
je 0x408567
and ebx, 0xfffffdff
lea ecx, [esp + 0x54]
mov dword [esp + 0x18], ebx
call fcn.00402ae0
test ebx, 0x100
je 0x408582
and ebx, 0xfffffeff
lea ecx, [esp + 0x3c]
mov dword [esp + 0x18], ebx
call fcn.00402ae0
test bl, bl
jns 0x408599
and ebx, 0xffffff7f
lea ecx, [esp + 0x40]
mov dword [esp + 0x18], ebx
call fcn.00402ae0
test bl, 0x40
mov dword [esp + 0x480], edi
je 0x4085b5
and ebx, 0xffffffbf
lea ecx, [esp + 0x48]
mov dword [esp + 0x18], ebx
call fcn.00402ae0
cmp byte [esp + 0x17], 0
jne 0x408600
mov esi, dword [esi + 0x18]
lea ecx, [esp + 0x6c]
push ecx
call fcn.0040e590
add esp, 4
mov ecx, eax
call fcn.0040e4b0
mov cl, byte [eax]
cmp cl, byte [esi]
jne 0x4085f3
test cl, cl
je 0x4085ef
mov cl, byte [eax + 1]
cmp cl, byte [esi + 1]
jne 0x4085f3
add eax, 2
add esi, 2
test cl, cl
jne 0x4085d3
xor eax, eax
jmp 0x4085f8
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, edi
jne 0x40879b
mov eax, dword [esp + 0x2c]
mov esi, dword [esp + 0x20]
add eax, 0x12c
xor edx, edx
mov dword [esp + 0x2c], eax
div dword [esi + 0x58]
lea edx, [esp + 0x26c]
push edx
add eax, 0x2bc
mov dword [esi + 0x54], eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [esi + 0x54]
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
push eax
push edi
push ecx
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x408674
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x20]
add eax, 0x12c
mov dword [esp + 0x2c], eax
xor edx, edx
div dword [ecx + 0x58]
add eax, 0x2bc
push eax
mov dword [ecx + 0x54], eax
mov eax, dword [ecx + 8]
mov ecx, dword [ecx + 4]
push 0
push eax
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov esi, dword [esp + 0x20]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x480], 0xffffffff
call fcn.00402ae0
cmp dword [esi + 0x38], 2
mov ebx, dword [esp + 0x20]
je 0x408154
mov eax, dword [esp + 0x50]
push 0
push eax
call fcn.00415050
mov ecx, dword [esp + 0x58]
push 0
push ecx
call fcn.00415050
mov edx, dword [esp + 0x24]
push 0
push edx
call fcn.00415050
mov eax, dword [esp + 0x34]
push 0
push eax
call fcn.00415050
mov edx, dword [ebx + 0xc]
push edx
lea ecx, [esp + 0x34]
call fcn.004029f0
push 0x1c
push str.LauncherCfgNewUpdateCfg.xml
lea ecx, [esp + 0x38]
mov dword [esp + 0x488], 8
call fcn.00404930
sub esp, 0xc
mov eax, esp
mov dword [esp + 0x40], esp
lea edi, [ebx + 0x5c]
push eax
call fcn.00405a10
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.004063d0
lea edi, [ebx + 0x3c]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push edi
mov dword [ebx + 0x38], 4
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov edx, dword [ebx + 8]
mov eax, dword [ebx + 4]
push 0x3e9
push 0
push edx
push eax
mov dword [ebx + 0x54], 0x3e9
call dword [sym.imp.USER32.dll_SendMessageA]
mov dword [esp + 0x480], 0xffffffff
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 0x408770
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x478]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x460]
xor ecx, esp
call fcn.004353a6
mov esp, ebp
pop ebp
ret 4
lea edx, [esp + 0x6c]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea ecx, [esp + 0x1c]
call fcn.00402ae0
xor eax, eax
jmp 0x408775
cmp dword [ebx + 0x38], 2
jne 0x4086c6
xor esi, esi
nop
mov eax, dword [ebx + 0x34]
push eax
lea edi, [esp + 0x28]
mov dword [esp + 0x28], 0
call fcn.00404f10
mov edi, dword [esp + 0x24]
test edi, edi
je 0x4086c6
push 0x200
lea ecx, [esp + 0x70]
push 0
push ecx
call fcn.004377f0
add esp, 0xc
push 0x200
lea edx, [esp + 0x270]
push 0
push edx
call fcn.004377f0
mov eax, dword [ebx + 0x10]
add esp, 0xc
push eax
lea ecx, [esp + 0x70]
push 0x200
push ecx
call fcn.004367c6
mov edx, dword [edi + 0x14]
add esp, 0xc
push edx
lea eax, [esp + 0x70]
push 0x200
push eax
call fcn.00436984
mov ecx, dword [ebx + 0x10]
add esp, 0xc
push ecx
lea edx, [esp + 0x270]
push 0x200
push edx
call fcn.004367c6
mov eax, dword [edi + 0x14]
add esp, 0xc
push eax
lea ecx, [esp + 0x270]
push 0x200
push ecx
call fcn.00436984
add esp, 0xc
cmp dword [edi], 1
je 0x4088e2
mov edi, dword [edi + 0x18]
lea edx, [esp + 0x6c]
push edx
call fcn.0040e590
add esp, 4
mov ecx, eax
call fcn.0040e4b0
mov cl, byte [eax]
cmp cl, byte [edi]
jne 0x4088a6
test cl, cl
je 0x4088a2
mov cl, byte [eax + 1]
cmp cl, byte [edi + 1]
jne 0x4088a6
add eax, 2
add edi, 2
test cl, cl
jne 0x408886
xor eax, eax
jmp 0x4088ab
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x408917
add esi, 0x12c
xor edx, edx
mov eax, esi
div dword [ebx + 0x58]
add eax, 0x2bc
mov dword [ebx + 0x54], eax
lea eax, [esp + 0x26c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [ebx + 0x54]
mov edx, dword [ebx + 8]
mov eax, dword [ebx + 4]
push ecx
push 0
push edx
push eax
jmp 0x408902
add esi, 0x12c
xor edx, edx
mov eax, esi
div dword [ebx + 0x58]
mov ecx, dword [ebx + 8]
mov edx, dword [ebx + 4]
add eax, 0x2bc
push eax
push 0
push ecx
mov dword [ebx + 0x54], eax
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
cmp dword [ebx + 0x38], 2
je 0x4087c0
jmp 0x4086c6
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 4]
push 0
push 0
push eax
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
xor eax, eax
jmp 0x408775