Function at 0x1031039
Capabilities:
Delete file

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x1075fb8]
xor eax, ebp
mov dword [ebp - 4], eax
and dword [ebp - 0x210], 0
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov eax, dword [0x1075004]
mov edi, 0x1075004
cmp eax, edi
je 0x1030ecb
test byte [eax + 0x1c], 4
je 0x1030ecb
cmp byte [eax + 0x19], 5
jb 0x1030ecb
push 0x10022b4
push 0xb9
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010090c5
mov esi, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x1077f18
mov dword [ebp - 0x214], 1
call esi
push 0x1077f58
call esi
mov esi, dword [ebx + 0x440]
mov eax, dword [0x1075004]
cmp eax, edi
je 0x1030f1c
test byte [eax + 0x1c], 4
je 0x1030f1c
cmp byte [eax + 0x19], 5
jb 0x1030f1c
push dword [esi + 0x18]
push 0x10022b4
push 0xba
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0101463a
mov eax, dword [esi + 0x34]
test eax, eax
je 0x1030f89
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
call fcn.010676d2
push dword [esi + 0x34]
mov dword [ebp - 0x218], eax
call fcn.0105c21c
and dword [esi + 0x34], 0
cmp dword [ebp - 0x218], 0
jge 0x1030f89
mov eax, dword [0x1075004]
cmp eax, edi
je 0x1030f80
test byte [eax + 0x1c], 4
je 0x1030f80
cmp byte [eax + 0x19], 2
jb 0x1030f80
push dword [ebp - 0x218]
push 0x10022b4
push 0xbb
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0101463a
xor eax, eax
mov word [ebp - 0x20c], ax
lea edi, [ebx + 0x20]
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov eax, dword [edi]
sub eax, dword [ebx + 0x18]
mov ecx, dword [edi + 4]
sbb ecx, dword [ebx + 0x1c]
mov dword [ebx + 0x28], eax
mov eax, dword [ebx + 0x450]
mov dword [ebx + 0x2c], ecx
cmp eax, 8
jne 0x1031012
mov eax, dword [0x1075004]
cmp eax, 0x1075004
je 0x1030fe4
test byte [eax + 0x1c], 4
je 0x1030fe4
cmp byte [eax + 0x19], 5
jb 0x1030fe4
push dword [esi + 0x18]
push 0x10022b4
push 0xbc
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0101463a
mov eax, dword [0x1075004]
xor ecx, ecx
cmp dword [ebx + 0x34], ecx
jne 0x1030ffd
mov dword [ebx + 0x30], 1
mov dword [ebp - 0x210], ecx
jmp 0x103130b
mov dword [ebp - 0x210], 1
mov dword [ebp - 0x214], ecx
jmp 0x1031310
cmp eax, 0xb
jne 0x10312fa
mov eax, dword [ebx + 0x454]
dec eax
cmp eax, 0xe
ja case.0x1031032.2
movzx eax, byte [eax + 0x103189e]
jmp dword [eax*4 + 0x103188a]
mov edi, 0x10780cc
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebx + 8]
test byte [eax + 0x30], 4
jne 0x103105b
cmp dword [eax + 0x18], 0
jne 0x103105b
and dword [ebp - 0x214], 0
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [0x1077fc8]
mov dword [ebp - 0x210], 1
test eax, eax
je 0x103130b
add eax, 0x24
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [0x1077fc8]
lea ecx, [eax + 0x1c]
push ecx
lea ecx, [eax + 0x20]
push ecx
lea ecx, [eax + 0x18]
push ecx
lea ecx, [eax + 0x14]
push ecx
lea ecx, [eax + 0x28]
push ecx
add eax, 0x24
push eax
call fcn.0106de30
test eax, eax
je 0x103130b
mov eax, dword [0x1075004]
cmp eax, 0x1075004
je 0x1031310
test byte [eax + 0x1c], 4
je 0x1031310
cmp byte [eax + 0x19], 2
jb 0x1031310
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10022b4
push 0xbd
mov eax, dword [0x1075004]
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0101463a
jmp 0x103130b
push esi
call fcn.0102eaa0
mov dword [ebp - 0x210], eax
mov eax, dword [0x1077fc8]
test eax, eax
je 0x103130b
add eax, 0x24
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [0x1077fc8]
lea ecx, [eax + 0x1c]
push ecx
lea ecx, [eax + 0x20]
push ecx
lea ecx, [eax + 0x18]
push ecx
lea ecx, [eax + 0x14]
push ecx
lea ecx, [eax + 0x28]
push ecx
add eax, 0x24
push eax
call fcn.0106de30
test eax, eax
je 0x103130b
mov eax, dword [0x1075004]
cmp eax, 0x1075004
je 0x1031310
test byte [eax + 0x1c], 4
je 0x1031310
cmp byte [eax + 0x19], 2
jb 0x1031310
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10022b4
push 0xbe
jmp 0x10310e2
push esi
call fcn.0102eaa0
mov dword [ebp - 0x210], eax
mov eax, dword [0x1077fc8]
test eax, eax
je 0x103130b
add eax, 0x28
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [0x1077fc8]
lea ecx, [eax + 0x1c]
push ecx
lea ecx, [eax + 0x20]
push ecx
lea ecx, [eax + 0x18]
push ecx
lea ecx, [eax + 0x14]
push ecx
lea ecx, [eax + 0x28]
push ecx
add eax, 0x24
push eax
call fcn.0106de30
test eax, eax
je 0x103130b
mov eax, dword [0x1075004]
cmp eax, 0x1075004
je 0x1031310
test byte [eax + 0x1c], 4
je 0x1031310
cmp byte [eax + 0x19], 2
jb 0x1031310
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10022b4
push 0xbf
jmp 0x10310e2
mov eax, dword [0x1077fc8]
and dword [ebp - 0x210], 0
test eax, eax
je 0x103130b
add eax, 0x24
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [0x1077fc8]
lea ecx, [eax + 0x1c]
push ecx
lea ecx, [eax + 0x20]
push ecx
lea ecx, [eax + 0x18]
push ecx
lea ecx, [eax + 0x14]
push ecx
lea ecx, [eax + 0x28]
push ecx
add eax, 0x24
push eax
call fcn.0106de30
test eax, eax
je 0x103130b
mov eax, dword [0x1075004]
cmp eax, 0x1075004
je 0x1031310
test byte [eax + 0x1c], 4
je 0x1031310
cmp byte [eax + 0x19], 2
jb 0x1031310
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10022b4
push 0xc0
jmp 0x10310e2
push esi
call fcn.0102eaa0
mov dword [ebp - 0x210], eax
mov eax, dword [0x1077fc8]
test eax, eax
je 0x103130b
add eax, 0x28
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [0x1077fc8]
lea ecx, [eax + 0x1c]
push ecx
lea ecx, [eax + 0x20]
push ecx
lea ecx, [eax + 0x18]
push ecx
lea ecx, [eax + 0x14]
push ecx
lea ecx, [eax + 0x28]
push ecx
add eax, 0x24
push eax
call fcn.0106de30
test eax, eax
je 0x103130b
mov eax, dword [0x1075004]
cmp eax, 0x1075004
je 0x1031310
test byte [eax + 0x1c], 4
je 0x1031310
cmp byte [eax + 0x19], 2
jb 0x1031310
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10022b4
push 0xc1
jmp 0x10310e2
cmp eax, 0xc
je 0x1031304
cmp eax, 0xd
jne 0x103130b
and dword [ebp - 0x210], 0
mov eax, dword [0x1075004]
cmp dword [ebx + 0x30], 0
je 0x10313a0
mov edi, 0x1075004
cmp eax, edi
je 0x1031347
test byte [eax + 0x1c], 4
je 0x1031347
cmp byte [eax + 0x19], 5
jb 0x1031347
push dword [esi + 0x18]
push 0x10022b4
push 0xc2
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0101463a
push 0x200
mov ecx, esi
call fcn.01036c9e
push esi
call fcn.010378bc
test eax, eax
jne 0x103138d
mov eax, dword [0x1075004]
cmp eax, edi
je 0x103138d
test byte [eax + 0x1c], 4
je 0x103138d
cmp byte [eax + 0x19], 2
jb 0x103138d
push dword [esi + 0x5e8]
push 0x10022b4
push 0xc3
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0101463a
mov eax, dword [esi + 0x15c]
inc dword [eax + 0xe4]
and dword [ebp - 0x210], 0
mov eax, dword [ebx + 0x454]
mov dword [esi + 0x590], eax
mov eax, dword [esi + 0x20]
add eax, 0x490
push eax
push 0x100
lea edi, [esi + 0x390]
push edi
call fcn.010676d2
cmp dword [ebp - 0x210], 0
jne 0x1031470
cmp dword [ebx + 0x30], 0
jne 0x1031437
cmp dword [esi + 0x590], 0
jne 0x10313f1
xor eax, eax
mov dword [esi + 0x590], 0xc
mov word [edi], ax
push esi
call fcn.0102e4f5
test eax, eax
jne 0x1031437
mov eax, dword [0x1075004]
cmp eax, 0x1075004
je 0x1031437
test byte [eax + 0x1c], 4
je 0x1031437
cmp byte [eax + 0x19], 2
jb 0x1031437
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [esi + 0x18]
mov eax, dword [0x1075004]
push 0x10022b4
push 0xc4
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100a693
push 1
push esi
call fcn.010358c0
mov eax, dword [esi + 0x20]
mov ecx, dword [eax + 0x18]
mov dword [esi + 0x380], ecx
mov ecx, dword [eax + 0x1c]
mov dword [esi + 0x384], ecx
mov ecx, dword [eax + 0x20]
mov dword [esi + 0x388], ecx
mov eax, dword [eax + 0x24]
mov dword [esi + 0x38c], eax
mov edi, 0x10022b4
jmp 0x103150c
mov eax, dword [0x1075004]
cmp eax, 0x1075004
je 0x10314a9
test byte [eax + 0x1c], 4
je 0x10314a9
cmp byte [eax + 0x19], 5
jb 0x10314a9
push dword [esi + 0x160]
mov edi, 0x10022b4
push dword [esi + 0x18]
push edi
push 0xc5
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100a693
jmp 0x10314ae
mov edi, 0x10022b4
push 0x40
mov ecx, esi
call fcn.01036c9e
cmp dword [ebp - 0x214], 1
jne 0x10314c8
push esi
call fcn.010376b9
jmp 0x103150c
push 1
push esi
call fcn.01037014
test eax, eax
jne 0x103150c
mov eax, dword [0x1075004]
cmp eax, 0x1075004
je 0x103150c
test byte [eax + 0x1c], 4
je 0x103150c
cmp byte [eax + 0x19], 2
jb 0x103150c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [esi + 0x34]
mov eax, dword [0x1075004]
push edi
push 0xc6
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010091cb
push dword [ebp - 0x210]
push esi
call fcn.01049dc9
cmp dword [ebp - 0x210], 0
jne 0x1031593
push 0x1077eb8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x1077ee8], 0xffffffff
jne 0x1031555
mov eax, dword [0x1075004]
cmp eax, 0x1075004
je 0x1031588
test byte [eax + 0x1c], 4
je 0x1031588
cmp byte [eax + 0x19], 2
jb 0x1031588
push edi
push 0xc7
jmp 0x103157d
push esi
call fcn.0102c453
test eax, eax
jne 0x1031588
mov eax, dword [0x1075004]
cmp eax, 0x1075004
je 0x1031588
test byte [eax + 0x1c], 4
je 0x1031588
cmp byte [eax + 0x19], 2
jb 0x1031588
push edi
push 0xc8
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010090c5
push 0x1077eb8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push esi
push 2
call fcn.0104d99d
test eax, eax
je 0x10315ce
mov ecx, dword [0x1075004]
cmp ecx, 0x1075004
je 0x10315ce
test byte [ecx + 0x1c], 4
je 0x10315ce
cmp byte [ecx + 0x19], 2
jb 0x10315ce
push eax
push dword [esi + 8]
push edi
push 0xc9
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.010146d9
mov eax, dword [ebx + 8]
push 1
push 0xffffffffffffffff
push 1
mov dword [eax + 0x2c], 0x20100000
push dword [ebx + 8]
call fcn.0102ed60
push 1
push ebx
call fcn.0102d8e1
test eax, eax
jne 0x1031627
mov eax, dword [0x1075004]
cmp eax, 0x1075004
je 0x1031627
test byte [eax + 0x1c], 4
je 0x1031627
cmp byte [eax + 0x19], 2
jb 0x1031627
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [0x1075004]
push edi
push 0xca
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0101463a
and dword [esi + 0x20], 0
cmp dword [esi + 0x5e8], 0x200
jne 0x1031707
and dword [ebp - 0x214], 0
cmp dword [esi + 0x1c], 2
mov ebx, dword [esi + 0x18]
jne 0x1031653
mov eax, dword [esi + 0x15c]
jmp 0x1031655
mov eax, esi
lea ecx, [ebp - 0x214]
push ecx
push dword [eax + 0xf8]
call fcn.0105f756
mov edi, eax
test edi, edi
je 0x103169b
mov eax, dword [0x1075004]
cmp eax, 0x1075004
je 0x103169b
test byte [eax + 0x1c], 4
je 0x103169b
cmp byte [eax + 0x19], 2
jb 0x103169b
push edi
push 0x10022b4
push 0xcb
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0101463a
push 0
push 1
push 1
push esi
call fcn.0103a6bb
test edi, edi
jne 0x1031707
push dword [ebp - 0x214]
push ebx
push 0x17
push edi
call fcn.0104e1ed
test eax, eax
jne 0x10316fc
mov eax, dword [0x1075004]
cmp eax, 0x1075004
je 0x10316fc
test byte [eax + 0x1c], 4
je 0x10316fc
cmp byte [eax + 0x19], 2
jb 0x10316fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [esi + 0x18]
mov eax, dword [0x1075004]
push 0x17
push 0x10022b4
push 0xcc
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01043d87
push dword [ebp - 0x214]
call fcn.0105c21c
push dword [0x1077f4c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x103175a
mov eax, dword [0x1075004]
cmp eax, 0x1075004
je 0x1031750
test byte [eax + 0x1c], 4
je 0x1031750
cmp byte [eax + 0x19], 2
jb 0x1031750
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [0x1075004]
push 0x10022b4
push 0xcd
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0101463a
mov dword [0x1077f48], 1
mov ebx, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, 0x1077f58
push edi
call ebx
push 0x1077f18
call ebx
cmp dword [ebp - 0x210], 0
jne 0x10317dd
lea eax, [ebp - 0x20c]
push eax
push esi
push 0
call fcn.0102ec1b
test eax, eax
jne 0x10317c7
mov eax, dword [0x1075004]
cmp eax, 0x1075004
je 0x10317c7
test byte [eax + 0x1c], 4
je 0x10317c7
cmp byte [eax + 0x19], 2
jb 0x10317c7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [esi + 0x18]
mov eax, dword [0x1075004]
push 0x10022b4
push 0xce
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100a693
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 1
push 1
push 1
push esi
call fcn.0103a6bb
push edi
call ebx
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x1031876
mov eax, dword [0x1075004]
mov esi, 0x1075004
cmp eax, esi
je 0x1031828
test byte [eax + 0x1c], 4
je 0x1031828
cmp byte [eax + 0x19], 5
jb 0x1031828
lea ecx, [ebp - 0x20c]
push ecx
push 0x10022b4
push 0xcf
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100915e
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1031876
mov eax, dword [0x1075004]
cmp eax, esi
je 0x1031876
test byte [eax + 0x1c], 4
je 0x1031876
cmp byte [eax + 0x19], 5
jb 0x1031876
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x20c]
push eax
mov eax, dword [0x1075004]
push 0x10022b4
push 0xd0
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010091cb
mov ecx, dword [ebp - 4]
pop edi
xor eax, eax
pop esi
xor ecx, ebp
inc eax
pop ebx
call fcn.0105b7af
leave
ret 4