Function at 0x410140
Capabilities:
Check if file exists
Create thread
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ffe7d
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x69ee98]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x1c], ebx
cmp dword [ebp + 0xc], 0
je 0x41019a
inc dword [ebx + 0x1bc]
push dword [ebx + 0x1bc]
call fcn.0040f1b0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebx + 0x6a4]
xor esi, esi
or edi, 0xffffffff
mov dword [ebp - 0x18], 0xffffffff
cmp dword [eax + 0x20], esi
jne 0x4101b9
cmp dword [eax + 0x5c], esi
jne 0x4101b9
lea esi, [edi + 2]
mov edx, dword [ebx + 0x170]
test edx, edx
jne 0x410260
cmp dword [ebx + 0x1cc], edx
jne 0x410260
mov eax, dword [ebx + 0x15c]
xor ecx, ecx
mov edx, dword [ebx + 0x184]
mov edi, dword [ebx + 0x1bc]
mov dword [ebp - 0x18], eax
mov eax, dword [ebx + 0x214]
mov dword [ebx + 0x170], edx
mov dword [ebx + 0x1cc], eax
test edx, edx
jle 0x41021c
mov eax, dword [ebx + 0x174]
mov dword [eax + ecx*4], 0
inc ecx
cmp ecx, dword [ebx + 0x184]
jl 0x410200
mov edx, dword [ebx + 0x170]
xor ecx, ecx
cmp dword [ebx + 0x214], ecx
jle 0x41024c
jmp 0x410230
mov eax, dword [ebx + 0x1c8]
mov dword [eax + ecx*4], 0
inc ecx
cmp ecx, dword [ebx + 0x214]
jl 0x410230
mov edx, dword [ebx + 0x170]
mov dword [ebx + 0x1bc], 0xffffffff
mov dword [ebx + 0x15c], 0xffffffff
cmp dword [ebx + 0x184], 1
jne 0x410286
cmp dword [ebx + 0x214], 0
jne 0x410286
xor ecx, ecx
mov dword [ebx + 0x138], 1
mov dword [ebx + 0x15c], ecx
jmp 0x41029d
test esi, esi
je 0x41028e
xor ecx, ecx
jmp 0x41029d
mov ecx, dword [ebx + 0x1cc]
add ecx, edx
call fcn.00407b30
mov ecx, eax
mov eax, dword [ebx + 0x170]
cmp ecx, eax
jl 0x41077a
mov edx, dword [ebx + 0x1cc]
test edx, edx
je 0x41077a
sub ecx, eax
cmp ecx, edx
jge 0x4109f2
mov eax, dword [ebx + 0x6a4]
mov edx, dword [ebx + 0x1bc]
mov esi, dword [ebx + 0x214]
cmp dword [eax + 0x5c], 0
je 0x410321
lea eax, [edx + ecx]
cdq
idiv esi
xor eax, eax
test edx, edx
sets al
dec eax
and eax, edx
mov edx, eax
cmp esi, 1
jle 0x4102fa
cmp eax, edi
jne 0x4102fa
inc eax
cdq
idiv esi
mov ecx, dword [ebx + 0x1c8]
cmp dword [ecx + edx*4], 0
jle 0x410312
lea eax, [edx + 1]
cdq
idiv esi
cmp dword [ecx + edx*4], 0
jg 0x410306
mov dword [ecx + edx*4], 1
mov dword [ebx + 0x1bc], edx
jmp 0x41033a
lea eax, [edx + 1]
cdq
idiv esi
mov eax, dword [ebx + 0x1c8]
mov dword [ebx + 0x1bc], edx
mov dword [eax + edx*4], 1
mov eax, dword [ebx + 0x234]
lea edx, [ebx + 0x270]
dec dword [ebx + 0x1cc]
mov ecx, edx
mov esi, dword [ebx + 0x1bc]
mov dword [ebx + 0x68c], eax
mov dword [ebp - 0x1c], edx
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x410360
sub ecx, edi
je 0x41036d
mov byte [edx], al
test esi, esi
js 0x410a13
cmp esi, dword [ebx + 0x228]
jge 0x410a13
mov eax, dword [ebx + 0x224]
lea ecx, [esi*4]
mov eax, dword [eax + ecx]
sub eax, 0x10
push eax
call fcn.00403750
add esp, 4
lea edi, [eax + 0x10]
mov dword [ebp - 0x10], edi
mov dword [ebp - 4], 0
cmp esi, dword [ebx + 0x228]
jge 0x410a13
mov eax, dword [ebx + 0x224]
lea ecx, [esi*4]
mov eax, dword [eax + ecx]
cmp dword [eax - 0xc], 0
je 0x4104ef
mov dword [0x6c77e0], 1
mov dword [0x6c77dc], 1
cmp esi, dword [ebx + 0x228]
jge 0x410a13
mov eax, dword [ebx + 0x224]
mov eax, dword [eax + ecx]
sub eax, 0x10
push eax
call fcn.00403750
add esp, 4
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
mov byte [ebp - 4], 1
mov edx, dword [eax + 4]
test edx, edx
js 0x410a09
mov ecx, 1
sub ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
sub eax, edx
or eax, ecx
jge 0x410437
push edx
lea ecx, [ebp - 0x14]
call fcn.00403840
mov esi, dword [ebp - 0x14]
push esi
lea eax, [ebx + 0x270]
push 0x208
push eax
call fcn.005e33e1
push dword [esi - 8]
push esi
call fcn.005dafda
add esp, 0x14
test eax, eax
js 0x410a09
cmp eax, dword [esi - 8]
jg 0x410a09
mov dword [esi - 0xc], eax
or ecx, 0xffffffff
mov byte [eax + esi], 0
add esi, 0xfffffff0
mov dword [0x6c77e0], 1
mov eax, ecx
mov dword [0x6c77dc], 1
mov byte [ebp - 4], 0
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4104ae
mov ebx, dword [esi]
push esi
mov eax, dword [ebx]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x613aec]
mov ecx, ebx
call esi
or ecx, 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea edx, [edi - 0x10]
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x4104d6
mov edi, dword [edx]
push edx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x613aec]
mov ecx, edi
call esi
mov eax, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp dword [0x6c77e4], 0
jne 0x410746
cmp dword [ebx + 0x10], 0
jne 0x410743
cmp esi, dword [ebx + 0x214]
jge 0x410a13
mov eax, dword [ebx + 0x210]
mov eax, dword [ecx + eax]
mov dword [ebp - 0x20], eax
mov eax, dword [eax + 4]
sub eax, 0x10
push eax
call fcn.00403750
mov edi, eax
add esp, 4
mov dword [ebp - 0x18], edi
lea esi, [edi + 0x10]
mov dword [ebp - 0x14], esi
mov byte [ebp - 4], 2
cmp dword [edi + 4], 0
jle 0x410659
push 0x5c
push esi
call fcn.005e0991
add esp, 8
test eax, eax
je 0x410659
sub eax, esi
cmp eax, 0xffffffff
je 0x410659
mov edx, dword [edi + 4]
test edx, edx
js 0x410a09
mov eax, dword [edi + 8]
mov ecx, 1
sub ecx, dword [edi + 0xc]
sub eax, edx
or eax, ecx
jge 0x41058c
push edx
lea ecx, [ebp - 0x14]
call fcn.00403840
mov esi, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x1c]
push esi
push 0x208
push ebx
call fcn.005e33e1
push dword [esi - 8]
push esi
call fcn.005dafda
add esp, 0x14
test eax, eax
js 0x410a09
cmp eax, dword [esi - 8]
jg 0x410a09
mov dword [esi - 0xc], eax
push ebx
mov byte [eax + esi], 0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4105d3
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
or ebx, 0xffffffff
mov dword [0x6c77e0], 1
mov dword [0x6c77dc], 1
add esi, 0xfffffff0
mov byte [ebp - 4], 0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x410611
mov edi, dword [esi]
push esi
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x613aec]
mov ecx, edi
call esi
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x4104d6
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x613aec]
mov ecx, edi
call esi
mov eax, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebx + 0x6b4]
mov ecx, 0x6c77d4
mov dword [0x6c77b8], eax
mov eax, dword [ebp - 0x20]
push 0x6c7804
mov eax, dword [eax]
mov dword [0x6c77cc], eax
call fcn.004033a0
lea eax, [ebx + 0x270]
mov dword [0x6c77dc], 0
mov dword [0x6c77d0], eax
mov ecx, 0x6c77d8
lea eax, [ebx + 0x694]
mov dword [0x6c77e0], 0
push eax
call fcn.004033a0
lea eax, [ebx + 0x1b8]
mov dword [0x6c77f4], eax
lea eax, [ebx + 0x710]
mov dword [0x6c77e8], eax
lea eax, [ebx + 0x860]
mov dword [0x6c77ec], eax
mov eax, dword [ebx + 0x6a4]
mov eax, dword [eax + 0x6c]
mov dword [0x6c77f0], eax
lea eax, [ebp - 0x24]
push eax
push 0
push 0x6c77b8
push 0x408bd0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x6c77e4], eax
mov byte [ebp - 4], 0
test eax, eax
je 0x410720
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x410611
mov edi, dword [edi]
push dword [ebp - 0x18]
jmp 0x410600
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x410743
mov edi, dword [edi]
push dword [ebp - 0x18]
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x613aec]
mov ecx, edi
call esi
mov edi, dword [ebp - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [edi - 0x10]
or eax, 0xffffffff
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x410184
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x613aec]
mov ecx, edi
call esi
jmp 0x410184
cmp dword [ebx + 0x138], 0
jne 0x41080a
mov eax, dword [ebx + 0x6a4]
mov edx, dword [ebx + 0x15c]
mov esi, dword [ebx + 0x184]
cmp dword [eax + 0x20], 0
je 0x4107eb
lea eax, [edx + ecx]
cdq
idiv esi
xor eax, eax
test edx, edx
sets al
dec eax
and eax, edx
mov edx, eax
cmp esi, 1
jle 0x4107bf
cmp eax, dword [ebp - 0x18]
jne 0x4107bf
inc eax
cdq
idiv esi
mov ecx, dword [ebx + 0x174]
cmp dword [ecx + edx*4], 0
jle 0x4107dc
jmp 0x4107d0
lea eax, [edx + 1]
cdq
idiv esi
cmp dword [ecx + edx*4], 0
jg 0x4107d0
mov dword [ecx + edx*4], 1
mov dword [ebx + 0x15c], edx
jmp 0x410804
lea eax, [edx + 1]
cdq
idiv esi
mov eax, dword [ebx + 0x174]
mov dword [ebx + 0x15c], edx
mov dword [eax + edx*4], 1
dec dword [ebx + 0x170]
mov ecx, dword [ebx + 0x15c]
test ecx, ecx
js 0x410a13
cmp ecx, dword [ebx + 0x184]
jge 0x410a13
mov eax, dword [ebx + 0x180]
mov eax, dword [eax + ecx*4]
mov ecx, dword [eax]
mov eax, dword [ebx + 0x6b4]
cmp ecx, dword [eax + 0x28]
jge 0x41084a
test ecx, ecx
js 0x410a13
mov eax, dword [eax + 0x24]
mov eax, dword [eax + ecx*4]
jmp 0x41084c
xor eax, eax
mov esi, dword [0x69f994]
mov dword [0x69f984], eax
add esi, 0xfffffff0
mov eax, dword [0x6c7804]
lea edx, [eax - 0x10]
cmp edx, esi
je 0x4108bc
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x4108ae
mov ecx, dword [edx]
cmp ecx, dword [esi]
jne 0x4108ae
push edx
call fcn.00403750
add esp, 4
mov dword [ebp - 0x20], eax
or ecx, 0xffffffff
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x4108a4
mov edi, dword [esi]
push esi
mov edx, dword [edi]
mov esi, dword [edx + 4]
mov ecx, esi
call dword [0x613aec]
mov ecx, edi
call esi
mov eax, dword [ebp - 0x20]
add eax, 0x10
mov dword [0x69f994], eax
jmp 0x4108bc
push dword [eax - 0xc]
mov ecx, 0x69f994
push eax
call fcn.004038a0
lea eax, [ebx + 0x740]
mov dword [0x69f998], eax
mov eax, dword [ebx + 0x6a4]
push 0
mov dword [0x69f98c], eax
call dword [sym.imp.USER32.dll_GetWindowDC]
mov edi, eax
push 0xc
push edi
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
push 0xe
push edi
mov ebx, eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
push edi
push 0
mov esi, eax
call dword [sym.imp.USER32.dll_ReleaseDC]
mov ecx, dword [ebp - 0x1c]
mov dword [0x69f9b0], 0
mov dword [0x69f9ac], 0
mov dword [0x69f9a8], 0
lea eax, [ecx + 0x18]
imul esi, ebx
mov dword [0x69f9c8], eax
lea eax, [ecx + 0x818]
mov dword [0x69f9a0], eax
lea eax, [ecx + 0x6f0]
mov dword [0x69f99c], eax
lea eax, [ecx + 0x158]
mov dword [0x69f9c4], eax
mov dword [0x69f990], esi
mov eax, dword [ecx + 0x6a4]
mov eax, dword [eax + 0x30]
mov dword [0x69f9c0], eax
mov eax, dword [ecx + 0x138]
mov dword [0x69f9b4], eax
mov eax, dword [ecx + 0x140]
mov dword [0x69f9b8], eax
mov eax, dword [ecx + 0x13c]
mov dword [0x69f9bc], eax
mov eax, dword [ecx + 0x1b0]
mov dword [0x69f9b0], eax
mov eax, dword [ecx + 0x190]
mov dword [ecx + 0x68c], eax
mov edx, dword [0x6c77b0]
sub edx, dword [0x6c77a8]
mov ecx, dword [ecx + 0x8b0]
push eax
mov eax, dword [0x6c77b4]
sub eax, dword [0x6c77ac]
push eax
call fcn.00407660
add esp, 8
cmp dword [0x69f9a4], 0
jne 0x4109f2
mov ecx, 0x69f978
call fcn.004091e0
mov eax, dword [0x69f9ac]
dec eax
neg eax
sbb eax, eax
and eax, 0xfffffff9
add eax, 7
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0x80070057
call fcn.00402cb0
call fcn.00486c16
int3