Function at 0x412496
Capabilities:
Delete file

Disassembly:
mov eax, 0x49a51a
call fcn.00498a28
sub esp, 0x13c
push ebx
push esi
mov ebx, ecx
push 0xffffffffffffffff
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, eax
test esi, esi
je 0x412516
xor edx, edx
xor ecx, ecx
call fcn.0040bdc2
push str.HttpDownloadProcessing_error:_object_signaled_failure
lea ecx, [ebp - 0x98]
mov dword [ebp - 0x60], 0x8b
mov dword [ebp - 0x5c], 9
mov dword [ebp - 0x58], str.C:BooCode_OffergateMultiSetupoglibOGLiboglib_serviceshttp_downloader.cpp
mov dword [ebp - 0x54], str.void___thiscall_og::HttpDownloader::HttpDownloadProcessing_unsigned_int_
call fcn.00403061
and dword [ebp - 4], 0
lea eax, [ebp - 0x60]
push ecx
push eax
lea eax, [ebp - 0x98]
push eax
push esi
call fcn.0040be49
lea ecx, [ebp - 0x98]
call fcn.00402fc0
jmp 0x41294d
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x148]
push edi
push 1
mov eax, dword [ebx + eax*4 + 0x98]
mov dword [ebp - 0x14], eax
mov byte [eax + 0x11f], 0
call fcn.004103f6
mov dword [ebp - 4], 1
lea esi, [ebx + 0x14]
jmp 0x412928
mov eax, dword [ebx + 0xc]
xor ecx, ecx
lock xadd dword [eax], ecx
test ecx, ecx
jne 0x412941
lea ecx, [ebx + 0x10]
call fcn.004120f9
mov edi, eax
mov dword [ebp - 0x24], edi
test edi, edi
je 0x412928
mov eax, dword [ebp - 0x14]
mov cl, byte [ebx + 0xe1]
mov byte [eax + 0x11c], cl
mov ecx, edi
call fcn.00410d99
movzx ecx, al
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x130]
xchg dword [eax], ecx
mov ecx, edi
call fcn.00410d99
mov ecx, dword [ebp - 0x14]
xor al, 1
push edi
mov byte [ecx + 0x120], al
lea eax, [ebp - 0x148]
push eax
mov dword [ecx + 0x118], 0x41335b
call fcn.00412b7c
test al, al
je 0x412928
mov eax, dword [edi + 0x200]
push 2
pop ecx
lock or dword [eax], ecx
mov ecx, dword [ebx + 0x34]
test ecx, ecx
je 0x4125db
mov eax, dword [ecx]
push edi
call dword [eax + 4]
xor eax, eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
push 2
pop ecx
mov byte [ebp - 4], cl
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x18], eax
cmp byte [ebx + 0xe0], al
je 0x412602
mov byte [ebp - 0xe], al
jmp 0x412631
call fcn.00417aa8
mov byte [ebp - 0xe], al
test al, al
je 0x412631
lea ecx, [ebp - 0x48]
call fcn.00417bd7
mov ecx, dword [ebp - 0x14]
push eax
mov byte [ebp - 4], 3
lea ecx, [ecx + 0xd8]
call fcn.0040e238
lea ecx, [ebp - 0x48]
call fcn.00402fc0
cmp byte [ebx + 0xe0], 0
je 0x412644
mov eax, dword [ebp - 0x14]
mov byte [eax + 0x11e], 1
lea eax, [ebx + 0xbc]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 8]
mov dword [ebx + eax*4 + 0xb0], edi
lea eax, [ebx + 0xbc]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x14]
add eax, 0x134
xor edx, edx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], edx
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x30]
call fcn.0040e064
xor ecx, ecx
lea edi, [ebp - 0x48]
xor eax, eax
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x4c], ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], 7
mov word [ebp - 0x48], ax
mov edi, dword [ebp - 0x24]
push 4
pop eax
mov byte [ebp - 4], al
mov eax, dword [ebp - 0x50]
lea ecx, [edi + 0x214]
mov dword [edi + 0x20c], eax
mov eax, dword [ebp - 0x4c]
mov dword [edi + 0x210], eax
lea eax, [ebp - 0x48]
push eax
call fcn.0040393a
push 2
pop eax
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], al
call fcn.00402f3d
cmp byte [ebp - 0xe], 0
je 0x4126f6
cmp dword [ebp - 0x18], 1
mov ecx, dword [ebp - 0x14]
setne al
mov byte [ecx + 0x11e], al
lea eax, [edi + 8]
push eax
lea ecx, [ebp - 0x98]
call fcn.00403962
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x70]
push 0x412146
push eax
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp - 0x148]
push eax
push 0
push 0
lea eax, [ebp - 0x98]
push eax
call fcn.0040cc30
push 2
mov byte [ebp - 0xd], al
lea ecx, [ebp - 0x98]
pop eax
mov byte [ebp - 4], al
call fcn.00402f3d
mov cl, byte [ebp - 0xd]
test cl, cl
jne 0x412754
or dword [edi + 0x20c], 0xffffffff
jmp 0x41276c
mov eax, dword [edi + 0x200]
push 0xfffffffffffffffb
pop edx
lock and dword [eax], edx
mov eax, dword [edi + 0x200]
push 8
pop edx
lock or dword [eax], edx
mov edx, dword [ebx + 0x34]
test edx, edx
je 0x41278e
mov ecx, dword [ebp - 0x14]
mov eax, dword [edx]
add ecx, 0x134
push ecx
push dword [ebp - 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, edx
push edi
call dword [eax + 8]
mov cl, byte [ebp - 0xd]
mov eax, dword [ebp - 0x1c]
cmp dword [eax], 0xff000000
je 0x4127c9
test cl, cl
jne 0x4127c9
mov edx, dword [ebp - 0x20]
mov eax, edx
inc dword [ebp - 0x18]
add edx, 0x3e8
mov dword [ebp - 0x20], edx
cmp eax, 0x1388
jae 0x4127c9
mov eax, dword [ebx + 0xc]
xor ecx, ecx
lock xadd dword [eax], ecx
test ecx, ecx
je 0x412678
mov cl, byte [ebp - 0xd]
mov eax, dword [edi + 0x200]
push 0xfffffffffffffffd
pop edx
lock and dword [eax], edx
test cl, cl
je 0x4127ea
push edi
lea eax, [ebp - 0x148]
mov ecx, ebx
push eax
call fcn.00412c53
jmp 0x4127f6
mov eax, dword [edi + 0x200]
push 4
pop ecx
lock or dword [eax], ecx
mov ecx, dword [ebx + 0x34]
test ecx, ecx
je 0x41280a
mov eax, dword [ecx]
lea edx, [ebp - 0x148]
push edx
push edi
call dword [eax + 0xc]
lea eax, [ebx + 0xbc]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 8]
and dword [ebx + eax*4 + 0xb0], 0
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x134], 0xff000000
jne 0x41290f
lea eax, [ebp - 0x120]
push eax
lea ecx, [ebp - 0x68]
call fcn.00403962
cmp dword [ebp - 0x54], 7
lea eax, [ebp - 0x68]
cmova eax, dword [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x68]
mov edi, eax
call fcn.00402f3d
test edi, edi
jne 0x41290f
xor edx, edx
xor ecx, ecx
call fcn.0040bdc2
lea eax, [ebp - 0x120]
mov dword [ebp - 0x80], 0xe7
push eax
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x7c], 0x11
mov dword [ebp - 0x78], str.C:BooCode_OffergateMultiSetupoglibOGLiboglib_serviceshttp_downloader.cpp
mov dword [ebp - 0x74], str.void___thiscall_og::HttpDownloader::HttpDownloadProcessing_unsigned_int_
call fcn.00403962
push ecx
lea edx, [ebp - 0x48]
mov byte [ebp - 4], 6
lea ecx, [ebp - 0xc8]
call fcn.00414eb3
pop ecx
push 0x2e
push str.Failed_to_delete_unfinished_download_for_file
push ecx
lea ecx, [ebp - 0xc8]
mov byte [ebp - 4], 7
call fcn.0040efea
push eax
lea ecx, [ebp - 0xb0]
call fcn.00403476
push 8
pop eax
mov byte [ebp - 4], al
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
lea ecx, [ebp - 0x80]
push ecx
lea ecx, [ebp - 0xb0]
push ecx
push eax
call fcn.0040be49
lea ecx, [ebp - 0xb0]
call fcn.00402fc0
lea ecx, [ebp - 0xc8]
call fcn.00402fc0
lea ecx, [ebp - 0x48]
call fcn.00402f3d
lea eax, [ebx + 0xbc]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 1
call fcn.004039b5
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [ebx + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
jne 0x412547
lea ecx, [ebp - 0x148]
call fcn.00410486
pop edi
mov ecx, dword [ebp - 0xc]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4