Function at 0x40b840
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5d870b
mov eax, dword fs:[0]
push eax
sub esp, 0x790
mov eax, dword [0x63ae80]
xor eax, esp
mov dword [esp + 0x788], eax
push ebx
push esi
push edi
mov eax, dword [0x63ae80]
xor eax, esp
push eax
lea eax, [esp + 0x7a0]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x10]
xor edi, edi
mov dword [esp + 0x10], eax
cmp dword [ebp + 0xc], edi
jne 0x40c483
call fcn.004064fb
push eax
push str._sdlcachepatchCache
lea eax, [esp + 0x19c]
push 0x100
push eax
call fcn.005a73a6
lea eax, [esp + 0x1a4]
add esp, 0x10
mov dword [esp + 0x11c], 0xf
mov dword [esp + 0x118], edi
mov byte [esp + 0x108], 0
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40b8dd
sub eax, ecx
push eax
lea eax, [esp + 0x198]
push eax
lea ecx, [esp + 0x110]
call fcn.0040232c
lea eax, [esp + 0x108]
push eax
mov dword [esp + 0x7ac], edi
call fcn.004732e0
mov bl, al
pop ecx
neg bl
sbb bl, bl
or dword [esp + 0x7a8], 0xffffffff
xor esi, esi
push edi
inc esi
push esi
lea ecx, [esp + 0x110]
call fcn.0040228b
inc bl
lea eax, [esp + 0x194]
je 0x40b964
push eax
push str.EnsureDirExistSafe_Failed_Dir_s
push 0x4a3
push 4
push dword [0x6470bc]
mov ebx, str.CUpdateThread::OnDownloadPatchCompleted
mov edi, str.UpdateThread.cpp
call fcn.004750b0
add esp, 0x14
jmp 0x40c483
mov dword [esp + 0x11c], 0xf
mov dword [esp + 0x118], edi
mov byte [esp + 0x108], 0
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40b981
sub eax, ecx
push eax
lea eax, [esp + 0x198]
push eax
lea ecx, [esp + 0x110]
call fcn.0040232c
mov eax, dword [esp + 0x10]
add eax, 0x54
push eax
xor ecx, ecx
lea edx, [esp + 0x10c]
mov dword [esp + 0x7ac], esi
mov dword [esp + 0x14], eax
call fcn.0040e13f
pop ecx
mov bl, al
push edi
neg bl
sbb bl, bl
or dword [esp + 0x7ac], 0xffffffff
push esi
lea ecx, [esp + 0x110]
call fcn.0040228b
inc bl
lea eax, [esp + 0xd0]
je 0x40bab3
push 0xa8
push eax
call fcn.0040dfb6
pop ecx
pop ecx
mov dword [esp + 0x7a8], 2
cmp dword [eax + 0x14], 0x10
jb 0x40ba0c
mov eax, dword [eax]
mov esi, dword [esp + 0x10]
sub esp, 0x1c
push 7
pop ecx
mov edi, esp
push eax
mov eax, dword [esp + 0x38]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [eax + 0x58]
mov ebx, 0x60cfd8
push ebx
call fcn.0040e021
or dword [esp + 0x7cc], 0xffffffff
add esp, 0x24
push 0
push 1
lea ecx, [esp + 0xd8]
call fcn.0040228b
lea eax, [esp + 0xd0]
push 0xa8
push eax
call fcn.0040dfb6
pop ecx
pop ecx
mov dword [esp + 0x7a8], 3
cmp dword [eax + 0x14], 0x10
jb 0x40ba6f
mov eax, dword [eax]
mov esi, dword [esp + 0x10]
sub esp, 0x1c
push 7
pop ecx
mov edi, esp
push eax
push ebx
push 0x4ab
push 4
push dword [0x6470bc]
rep movsd dword es:[edi], dword [esi]
mov ebx, str.CUpdateThread::OnDownloadPatchCompleted
mov edi, str.UpdateThread.cpp
call fcn.004750b0
add esp, 0x30
push 0
push 1
lea ecx, [esp + 0xd8]
call fcn.0040228b
jmp 0x40c483
mov ebx, 0xab
push ebx
push eax
call fcn.0040dfb6
pop ecx
pop ecx
mov dword [esp + 0x7a8], 4
cmp dword [eax + 0x14], 0x10
jb 0x40bad4
mov eax, dword [eax]
push eax
mov eax, dword [esp + 0x1c]
mov edi, dword [eax + 0x58]
mov esi, 0x60c3d4
push esi
call fcn.0040e021
or dword [esp + 0x7b0], 0xffffffff
pop ecx
pop ecx
push 0
push 1
lea ecx, [esp + 0xd8]
call fcn.0040228b
lea eax, [esp + 0xd0]
push ebx
push eax
call fcn.0040dfb6
pop ecx
pop ecx
mov dword [esp + 0x7a8], 5
cmp dword [eax + 0x14], 0x10
jb 0x40bb24
mov eax, dword [eax]
push eax
push esi
push 0x4b1
push 2
push dword [0x6470bc]
mov ebx, str.CUpdateThread::OnDownloadPatchCompleted
mov edi, str.UpdateThread.cpp
call fcn.004750b0
or dword [esp + 0x7bc], 0xffffffff
add esp, 0x14
xor edi, edi
push edi
push 1
lea ecx, [esp + 0xd8]
call fcn.0040228b
lea eax, [esp + 0x194]
push eax
push str._sChangeLists.txt
lea eax, [esp + 0x49c]
push 0x100
push eax
mov dword [esp + 0x20], edi
call fcn.005a73a6
add esp, 0x10
lea eax, [esp + 0x494]
push eax
lea eax, [esp + 0x20]
push eax
call fcn.0040c95d
mov dword [esp + 0x7a8], 6
cmp dword [esp + 0x80], edi
jne 0x40bc3d
mov esi, 0xb5
lea eax, [esp + 0xd0]
push esi
push eax
call fcn.0040dfb6
pop ecx
pop ecx
mov byte [esp + 0x7a8], 7
cmp dword [eax + 0x14], 0x10
jb 0x40bbd3
mov eax, dword [eax]
push eax
mov eax, dword [esp + 0x1c]
mov edi, dword [eax + 0x58]
call fcn.0040e021
pop ecx
push 0
push 1
lea ecx, [esp + 0xd8]
mov byte [esp + 0x7b0], 6
call fcn.0040228b
lea eax, [esp + 0xd0]
push esi
push eax
call fcn.0040dfb6
pop ecx
pop ecx
mov byte [esp + 0x7a8], 8
cmp dword [eax + 0x14], 0x10
jb 0x40bc19
mov eax, dword [eax]
push eax
push 0x4be
push 4
push dword [0x6470bc]
mov edi, str.UpdateThread.cpp
call fcn.004750b0
lea ecx, [esp + 0xe0]
jmp 0x40c44a
and dword [esp + 0xfc], 0
mov dword [esp + 0x100], 0xf
mov byte [esp + 0xec], 0
mov eax, 0x2000
lea ecx, [esp + 0xec]
mov byte [esp + 0x7a8], 9
call fcn.004034fa
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 4]
test byte [esp + eax + 0x28], 1
jne 0x40c113
cmp dword [esp + 0x100], 0x10
mov esi, dword [esp + 0xec]
jae 0x40bc9b
lea esi, [esp + 0xec]
push 0xa
lea eax, [esp + eax + 0x20]
push eax
call fcn.0040436c
movzx eax, al
push eax
push esi
lea eax, [esp + 0x24]
push eax
call fcn.0040d2d1
mov edx, dword [esp + 0x100]
mov ebx, dword [esp + 0xec]
mov esi, ebx
cmp edx, 0x10
jae 0x40bcd2
lea esi, [esp + 0xec]
push 5
mov edi, str.add:
pop ecx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40bce5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40bcf6
mov dword [esp + 0x10], 1
jmp 0x40c0f7
mov esi, ebx
cmp edx, 0x10
jae 0x40bd04
lea esi, [esp + 0xec]
push 8
mov edi, str.modify:
pop ecx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40bd17
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40bd28
mov dword [esp + 0x10], 2
jmp 0x40c0f7
mov esi, ebx
cmp edx, 0x10
jae 0x40bd36
lea esi, [esp + 0xec]
push 8
mov edi, str.remove:
pop ecx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40bd49
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40bd5a
mov dword [esp + 0x10], 3
jmp 0x40c0f7
cmp dword [esp + 0x10], 1
je 0x40bdb5
cmp dword [esp + 0x10], 2
je 0x40bdb5
cmp dword [esp + 0x10], 3
jne 0x40c0f7
mov eax, ebx
cmp edx, 0x10
jae 0x40bd81
lea eax, [esp + 0xec]
push eax
call fcn.004064fb
push eax
push str._sgame_s
lea eax, [esp + 0x5a0]
push 0x100
push eax
call fcn.005a73a6
add esp, 0x14
lea eax, [esp + 0x594]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x40c0f7
and dword [esp + 0x150], 0
push 0xf
pop eax
mov dword [esp + 0x154], eax
mov byte [esp + 0x140], 0
and dword [esp + 0x118], 0
mov dword [esp + 0x11c], eax
mov byte [esp + 0x108], 0
mov byte [esp + 0x7a8], 0xb
lea ebx, [esp + 0x14]
lea eax, [esp + 0xec]
mov byte [esp + 0x14], 0x5c
call fcn.0040d1bf
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40be39
xor edi, edi
push edi
push 0x60d3b0
lea ecx, [esp + 0x148]
call fcn.0040232c
push ebx
push edi
lea eax, [esp + 0xf4]
push eax
lea ecx, [esp + 0x114]
call fcn.004021d1
jmp 0x40becd
push ebx
push 0
lea eax, [esp + 0xf4]
push eax
lea esi, [esp + 0xdc]
call fcn.0040c80d
mov esi, eax
lea edi, [esp + 0x140]
mov byte [esp + 0x7a8], 0xc
call fcn.00403eaf
push 0
push 1
lea ecx, [esp + 0xd8]
mov byte [esp + 0x7b0], 0xb
call fcn.0040228b
mov eax, dword [esp + 0xfc]
sub eax, ebx
push eax
push ebx
lea eax, [esp + 0xf4]
push eax
lea esi, [esp + 0xdc]
call fcn.0040c80d
mov esi, eax
lea edi, [esp + 0x108]
mov byte [esp + 0x7a8], 0xd
call fcn.00403eaf
push 0
push 1
lea ecx, [esp + 0xd8]
mov byte [esp + 0x7b0], 0xb
call fcn.0040228b
xor edi, edi
cmp dword [esp + 0x154], 0x10
mov eax, dword [esp + 0x140]
jae 0x40bee5
lea eax, [esp + 0x140]
push eax
lea eax, [esp + 0x198]
push eax
mov esi, str._sgame_s
push esi
mov ebx, 0x100
lea eax, [esp + 0x3a0]
push ebx
push eax
call fcn.005a73a6
mov eax, dword [esp + 0x154]
add esp, 0x14
cmp dword [esp + 0x154], 0x10
jae 0x40bf22
lea eax, [esp + 0x140]
push eax
call fcn.004064fb
push eax
push esi
lea eax, [esp + 0x2a0]
push ebx
push eax
call fcn.005a73a6
add esp, 0x14
push 0xf
pop ebx
lea eax, [esp + 0x394]
mov dword [esp + 0x170], ebx
mov dword [esp + 0x16c], edi
mov byte [esp + 0x15c], 0
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40bf5e
sub eax, esi
push eax
lea eax, [esp + 0x398]
push eax
lea ecx, [esp + 0x164]
call fcn.0040232c
push edi
lea eax, [esp + 0x10c]
push eax
or eax, 0xffffffff
lea esi, [esp + 0x164]
mov byte [esp + 0x7b0], 0xe
call fcn.004042a3
lea eax, [esp + 0x294]
mov dword [esp + 0x138], ebx
mov dword [esp + 0x134], edi
mov byte [esp + 0x124], 0
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40bfbc
sub eax, esi
push eax
lea eax, [esp + 0x298]
push eax
lea ecx, [esp + 0x12c]
call fcn.0040232c
push edi
lea eax, [esp + 0x10c]
push eax
or eax, 0xffffffff
lea esi, [esp + 0x12c]
mov byte [esp + 0x7b0], 0xf
call fcn.004042a3
lea eax, [esp + 0x294]
mov dword [esp + 0xe4], ebx
mov dword [esp + 0xe0], edi
mov byte [esp + 0xd0], 0
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40c01a
sub eax, ecx
push eax
lea eax, [esp + 0x298]
push eax
lea ecx, [esp + 0xd8]
call fcn.0040232c
lea eax, [esp + 0xd0]
push eax
mov byte [esp + 0x7ac], 0x10
call fcn.004732e0
mov bl, al
pop ecx
neg bl
sbb bl, bl
xor esi, esi
push edi
inc esi
push esi
lea ecx, [esp + 0xd8]
mov byte [esp + 0x7b0], 0xf
call fcn.0040228b
inc bl
jne 0x40c218
mov ecx, dword [esp + 0x124]
push 0x10
pop ebx
cmp dword [esp + 0x138], ebx
jae 0x40c08f
lea ecx, [esp + 0x124]
mov eax, dword [esp + 0x15c]
cmp dword [esp + 0x170], ebx
jae 0x40c0a6
lea eax, [esp + 0x15c]
push ecx
push eax
call fcn.00473430
pop ecx
pop ecx
test al, al
je 0x40c28f
push edi
push esi
lea ecx, [esp + 0x12c]
call fcn.0040228b
push edi
push esi
lea ecx, [esp + 0x164]
call fcn.0040228b
push edi
push esi
lea ecx, [esp + 0x110]
call fcn.0040228b
push edi
push esi
lea ecx, [esp + 0x148]
mov byte [esp + 0x7b0], 9
call fcn.0040228b
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 4]
test byte [esp + eax + 0x28], 1
je 0x40bc83
mov ebx, str.CUpdateThread::OnDownloadPatchCompleted
mov esi, 0x60c3d4
mov edi, dword [esp + 0x18]
mov eax, dword [edi + 0x64]
test eax, eax
je 0x40c427
cmp dword [eax], 0
je 0x40c427
call fcn.004064fb
push eax
push str._sgame
lea eax, [esp + 0x69c]
push 0x100
push eax
call fcn.005a73a6
mov eax, dword [edi + 0x64]
mov ecx, dword [eax]
lea eax, [edi + 0x84]
add esp, 0x10
cmp dword [eax + 0x14], 0x10
jb 0x40c15e
mov eax, dword [eax]
mov edx, dword [ecx]
push eax
lea eax, [esp + 0x698]
push eax
call dword [edx + 0xc]
test al, al
lea eax, [esp + 0xd0]
jne 0x40c36b
push 0xb9
push eax
call fcn.0040dfb6
pop ecx
pop ecx
mov byte [esp + 0x7a8], 0x13
cmp dword [eax + 0x14], 0x10
jb 0x40c198
mov eax, dword [eax]
mov edi, dword [edi + 0x58]
push eax
push esi
call fcn.0040e021
pop ecx
pop ecx
push 0
push 1
lea ecx, [esp + 0xd8]
mov byte [esp + 0x7b0], 9
call fcn.0040228b
lea eax, [esp + 0xd0]
push 0xb9
push eax
call fcn.0040dfb6
pop ecx
pop ecx
mov byte [esp + 0x7a8], 0x14
cmp dword [eax + 0x14], 0x10
jb 0x40c1e0
mov eax, dword [eax]
push eax
push esi
push 0x511
push 4
push dword [0x6470bc]
mov edi, str.UpdateThread.cpp
call fcn.004750b0
add esp, 0x14
push 0
push 1
lea ecx, [esp + 0xd8]
call fcn.0040228b
lea ecx, [esp + 0xec]
jmp 0x40c44d
lea eax, [esp + 0x294]
push eax
push str.EnsureDirExistSafe_Failed_Dir_s
push 0x4ef
push 4
push dword [0x6470bc]
mov ebx, str.CUpdateThread::OnDownloadPatchCompleted
mov edi, str.UpdateThread.cpp
call fcn.004750b0
xor esi, esi
add esp, 0x14
xor edi, edi
inc esi
push edi
push esi
lea ecx, [esp + 0x12c]
call fcn.0040228b
push edi
push esi
lea ecx, [esp + 0x164]
call fcn.0040228b
push edi
push esi
lea ecx, [esp + 0x110]
call fcn.0040228b
push edi
push esi
lea ecx, [esp + 0x148]
call fcn.0040228b
push edi
push esi
lea ecx, [esp + 0xf4]
jmp 0x40c451
mov esi, 0xb6
lea eax, [esp + 0xd0]
push esi
push eax
call fcn.0040dfb6
pop ecx
pop ecx
mov byte [esp + 0x7a8], 0x11
mov ecx, dword [esp + 0x124]
cmp dword [esp + 0x138], ebx
jae 0x40c2c3
lea ecx, [esp + 0x124]
cmp dword [eax + 0x14], ebx
jb 0x40c2ca
mov eax, dword [eax]
push ecx
push eax
mov eax, dword [esp + 0x20]
mov edi, dword [eax + 0x58]
mov ebx, 0x60cfd8
push ebx
call fcn.0040e021
add esp, 0xc
push 0
push 1
lea ecx, [esp + 0xd8]
mov byte [esp + 0x7b0], 0xf
call fcn.0040228b
lea eax, [esp + 0xd0]
push esi
push eax
call fcn.0040dfb6
pop ecx
pop ecx
mov byte [esp + 0x7a8], 0x12
cmp dword [esp + 0x138], 0x10
mov ecx, dword [esp + 0x124]
jae 0x40c329
lea ecx, [esp + 0x124]
cmp dword [eax + 0x14], 0x10
jb 0x40c331
mov eax, dword [eax]
push ecx
push eax
push ebx
push 0x4f5
push 4
push dword [0x6470bc]
mov ebx, str.CUpdateThread::OnDownloadPatchCompleted
mov edi, str.UpdateThread.cpp
call fcn.004750b0
add esp, 0x18
xor edi, edi
xor esi, esi
push edi
inc esi
push esi
lea ecx, [esp + 0xd8]
call fcn.0040228b
jmp 0x40c249
push 0xb7
push eax
call fcn.0040dfb6
pop ecx
pop ecx
mov byte [esp + 0x7a8], 0x15
cmp dword [eax + 0x14], 0x10
jb 0x40c388
mov eax, dword [eax]
mov edi, dword [edi + 0x58]
push eax
push esi
call fcn.0040e021
pop ecx
pop ecx
push 0
push 1
lea ecx, [esp + 0xd8]
mov byte [esp + 0x7b0], 9
call fcn.0040228b
lea eax, [esp + 0x178]
push 0xb7
push eax
call fcn.0040dfb6
pop ecx
pop ecx
mov byte [esp + 0x7a8], 0x16
cmp dword [eax + 0x14], 0x10
jb 0x40c3d0
mov eax, dword [eax]
push eax
push esi
push 0x515
push 4
push dword [0x6470bc]
mov edi, str.UpdateThread.cpp
call fcn.004750b0
add esp, 0x14
xor esi, esi
push esi
push 1
lea ecx, [esp + 0x180]
mov byte [esp + 0x7b0], 9
call fcn.0040228b
mov eax, dword [esp + 0x18]
push esi
push esi
push 0x40a
push dword [eax + 0x30]
call dword [sym.imp.USER32.dll_PostThreadMessageA]
push str.__UpdateThread_WM_CHECK_PATCH
push 0x517
push 2
jmp 0x40c433
push str.Invalid_m_pBridgePlugin
push 0x508
push 4
push dword [0x6470bc]
mov edi, str.UpdateThread.cpp
call fcn.004750b0
lea ecx, [esp + 0xfc]
add esp, 0x10
push 0
push 1
call fcn.0040228b
or dword [esp + 0x7a8], 0xffffffff
lea ecx, [esp + 0x84]
call fcn.0040ca89
lea eax, [esp + 0x84]
push eax
mov dword [esp + 0x88], vtable.std::ios_base.0
call fcn.005c736f
pop ecx
mov ecx, dword [esp + 0x7a0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x788]
xor ecx, esp
call fcn.005a6d8e
mov esp, ebp
pop ebp
ret 0xc