Function at 0x10041d60
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x244
mov eax, dword [0x11ad127c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x240], 0
xor edi, edi
mov dword [ebp - 0x244], esi
push edi
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
je 0x10042537
mov ecx, esi
xor edx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x21c], eax
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10041db0
sub ecx, dword [ebp - 0x21c]
sar ecx, 1
je 0x10041e09
nop word [eax + eax]
movzx eax, word [esi + edx*2]
cmp eax, 0x5c
je 0x10042537
cmp eax, 0x2f
je 0x10042537
mov ecx, esi
inc edx
lea eax, [ecx + 2]
mov dword [ebp - 0x21c], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10041df2
sub ecx, dword [ebp - 0x21c]
sar ecx, 1
cmp edx, ecx
jb 0x10041dd0
cmp dword [0x11d23c18], ebx
jne 0x10041e6e
push 0x10468d00
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ecx, eax
test ecx, ecx
je 0x10042503
mov eax, dword [0x11d23c18]
mov dword [ebp - 0x22c], eax
test eax, eax
jne 0x10041e54
push 0x10468d90
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x22c], eax
mov dword [0x11d23c18], eax
test eax, eax
je 0x10042503
push 0x11d23c14
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [ebp - 0x22c]
test eax, eax
je 0x10042503
mov eax, dword [0x11d23c14]
mov ecx, 0x42ea
mov dword [ebp - 0x23c], eax
call fcn.10043950
test eax, eax
je 0x10042064
push 0x208
lea eax, [ebp - 0x216]
push 0
push eax
call fcn.10425c00
xor eax, eax
add esp, 0xc
mov word [ebp - 0x218], ax
xor edi, edi
mov eax, dword [0x112272a0]
test eax, eax
je 0x10041f63
mov ecx, dword [ebp - 0x23c]
mov dword [ebp - 0x23c], ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x10041f29
push 0x104
lea ecx, [ebp - 0x218]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov esi, eax
test esi, esi
je 0x10041f29
mov ax, word [ebp - 0x218]
cmp ax, 0x5c
je 0x10041f40
cmp ax, 0x2f
je 0x10041f40
movzx eax, ax
push eax
call fcn.1043a2f0
add esp, 4
test eax, eax
je 0x10041f29
cmp word [ebp - 0x216], 0x3a
jne 0x10041f29
mov ax, word [ebp - 0x214]
cmp ax, 0x5c
je 0x10041f40
cmp ax, 0x2f
je 0x10041f40
mov eax, dword [edi*4 + 0x112272a4]
inc edi
test eax, eax
jne 0x10041ec5
jmp 0x10041f5a
cmp word [ebp + esi*2 - 0x218], 0x5c
je 0x10041f50
sub esi, 1
jne 0x10041f40
xor eax, eax
mov word [ebp + esi*2 - 0x218], ax
cmp word [ebp - 0x218], bx
jne 0x10041f6e
lea ecx, [ebp - 0x218]
call fcn.10042560
mov eax, dword [ebp - 0x23c]
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x23c], eax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10041f83
mov esi, dword [ebp - 0x244]
sub ecx, edx
mov edx, esi
sar ecx, 1
lea edi, [edx + 2]
nop dword [eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x10041fa0
sub edx, edi
sar edx, 1
test ecx, ecx
je 0x10041fcf
cmp word [ebp + ecx*2 - 0x21a], 0x5c
je 0x10041fcf
test edx, edx
je 0x10041fcf
cmp word [esi], 0x5c
je 0x10041fcf
mov eax, 1
jmp 0x10041fd1
xor eax, eax
mov dword [ebp - 0x21c], eax
add eax, edx
add eax, ecx
lea eax, [eax*2 + 2]
push eax
push 0x40
mov dword [ebp - 0x22c], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x10042049
mov edx, dword [ebp - 0x22c]
lea eax, [ebp - 0x218]
push eax
mov ecx, edi
call fcn.1003f4a0
test eax, eax
js 0x1004203f
cmp dword [ebp - 0x21c], ebx
je 0x1004202d
mov edx, dword [ebp - 0x22c]
mov ecx, edi
push 0x1046a5c0
call fcn.1003f5b0
test eax, eax
js 0x1004203f
mov edx, dword [ebp - 0x22c]
mov ecx, edi
push esi
call fcn.1003f5b0
test eax, eax
jns 0x10042049
mov eax, dword [sym.imp.KERNEL32.dll_LocalFree]
push edi
call eax
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1004205d
test al, 0x50
je 0x100424d2
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
call fcn.10043070
xor edi, edi
mov dword [ebp - 0x240], eax
cmp eax, ebx
je 0x100424d2
mov edx, 0x1046a840
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x10042081
sub edx, ecx
lea ecx, [esi + 2]
sar edx, 1
mov dword [ebp - 0x22c], edx
nop dword [eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x100420a0
mov edi, dword [ebp - 0x244]
sub esi, ecx
mov ecx, edi
sar esi, 1
lea ebx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100420c0
sub ecx, ebx
mov dword [ebp - 0x21c], 0x5c
sar ecx, 1
mov ebx, 0x2e
lea ecx, [edi + ecx*2]
mov eax, ecx
cmp edi, ecx
jae 0x10042114
mov edx, edi
nop dword [eax]
movzx edi, word [eax]
cmp word [ebp - 0x21c], di
je 0x10042108
cmp bx, di
je 0x10042108
sub eax, 2
cmp edx, eax
jb 0x100420f0
mov edx, dword [ebp - 0x22c]
mov edi, dword [ebp - 0x244]
cmp bx, word [eax]
cmove ecx, eax
lea ebx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10042120
sub ecx, ebx
sar ecx, 1
sub ecx, 0
je 0x10042405
sub ecx, 1
je 0x100422f0
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10042146
sub ecx, edx
sar ecx, 1
lea esi, [ecx + 1]
lea eax, [esi + esi]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
jne 0x10042182
push dword [ebp - 0x240]
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFree]
xor edi, edi
call ebx
push edi
call ebx
jmp 0x10042511
push edi
mov edx, esi
mov ecx, ebx
call fcn.1003f430
test eax, eax
jns 0x10042199
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor ebx, ebx
xor edi, edi
test ebx, ebx
je 0x100424d2
mov ecx, ebx
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100421b0
sub ecx, edx
sar ecx, 1
lea esi, [ebx + ecx*2]
mov eax, esi
cmp ebx, esi
jae 0x100421e6
mov edx, 0x2e
mov edi, 0x5c
movzx ecx, word [eax]
cmp di, cx
je 0x100421e6
cmp dx, cx
je 0x100421e6
sub eax, 2
cmp ebx, eax
jb 0x100421d2
mov ecx, 0x2e
cmp cx, word [eax]
push 0x1046a840
cmove esi, eax
xor edi, edi
push esi
call fcn.1043414f
add esp, 8
test eax, eax
je 0x10042218
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10042218
mov ecx, ebx
call fcn.10043ff0
mov edi, eax
push 0x1046a850
push esi
call fcn.1043414f
add esp, 8
test eax, eax
je 0x1004247c
test edi, edi
jne 0x100424d2
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jne 0x100422b7
cmp dword [ebp - 0x23c], edi
lea ecx, [ebp - 0x238]
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x22c], eax
lea eax, [ebp - 0x228]
cmove eax, ecx
mov dword [ebp - 0x228], 0x1046a860
push eax
push dword [ebp - 0x240]
mov ecx, ebx
mov dword [ebp - 0x224], 0x1046a890
mov dword [ebp - 0x220], 0x1046a8c0
mov dword [ebp - 0x238], 0x1046a900
mov dword [ebp - 0x234], 0x1046a930
mov dword [ebp - 0x230], 0x1046a960
call fcn.10044200
mov edi, eax
test edi, edi
jne 0x100424d2
call esi
test eax, eax
jne 0x10042486
mov dword [ebp - 0x21c], eax
mov ecx, ebx
lea eax, [ebp - 0x224]
mov dword [ebp - 0x224], 0x1046a990
push eax
mov dword [ebp - 0x220], 0x1046a9d0
call fcn.10044490
mov edi, eax
jmp 0x10042482
lea ecx, [esi - 1]
mov dword [ebp - 0x22c], ecx
test ecx, ecx
js 0x10042197
mov esi, edi
lea edx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x10042306
sub esi, edx
sar esi, 1
cmp ecx, esi
cmovb esi, ecx
inc esi
lea eax, [esi + esi]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
mov dword [ebp - 0x21c], ebx
test ebx, ebx
je 0x1004216a
test esi, esi
je 0x100423cb
cmp esi, 0x7fffffff
ja 0x100423ef
mov eax, dword [ebp - 0x22c]
cmp eax, 0x7ffffffe
jbe 0x1004236e
xor eax, eax
mov word [ebx], ax
mov eax, dword [ebp - 0x23c]
mov dword [ebp - 0x23c], eax
jmp 0x10042190
sub eax, esi
mov ecx, ebx
mov dword [ebp - 0x22c], eax
sub edi, ebx
mov eax, dword [ebp - 0x23c]
mov ebx, dword [ebp - 0x22c]
mov dword [ebp - 0x23c], eax
nop dword [eax]
lea eax, [esi + ebx]
test eax, eax
je 0x100423ab
movzx eax, word [ecx + edi]
test ax, ax
je 0x100423ab
mov word [ecx], ax
add ecx, 2
sub esi, 1
jne 0x10042390
mov ebx, dword [ebp - 0x21c]
lea eax, [ecx - 2]
test esi, esi
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
test esi, esi
jne 0x10042199
jmp 0x10042190
mov eax, dword [ebp - 0x23c]
mov dword [ebp - 0x23c], eax
test esi, esi
je 0x10042190
xor ecx, ecx
mov dword [ebp - 0x23c], eax
mov word [ebx], cx
jmp 0x10042190
mov eax, dword [ebp - 0x23c]
xor ecx, ecx
mov word [ebx], cx
mov dword [ebp - 0x23c], eax
jmp 0x10042190
lea eax, [esi + edx]
lea esi, [eax*2 + 2]
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
je 0x10042199
push edi
mov edx, esi
mov ecx, ebx
call fcn.1003f4a0
test eax, eax
jns 0x1004244b
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFree]
call ebx
push dword [ebp - 0x240]
xor edi, edi
call ebx
push edi
call ebx
jmp 0x10042511
push 0x1046a840
mov edx, esi
mov ecx, ebx
call fcn.1003f5b0
test eax, eax
jns 0x10042199
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFree]
call ebx
push dword [ebp - 0x240]
xor edi, edi
call ebx
push edi
call ebx
jmp 0x10042511
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
jne 0x100424d2
call esi
test eax, eax
jne 0x100424d2
cmp dword [ebp - 0x23c], 0
lea ecx, [ebp - 0x230]
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x22c], eax
lea eax, [ebp - 0x220]
cmove eax, ecx
mov dword [ebp - 0x220], 0x1046aa10
push eax
push dword [ebp - 0x240]
mov ecx, ebx
mov dword [ebp - 0x230], 0x1046aa40
call fcn.10044200
mov edi, eax
push dword [ebp - 0x240]
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
call esi
push ebx
call esi
test edi, edi
je 0x10042511
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
push 0
call eax
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1045066c
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
push 0
call esi
push 0
call esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10042524
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x7e
call eax
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1045066c
mov esp, ebp
pop ebp
ret
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
push 0xa0
call eax
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1045066c
mov esp, ebp
pop ebp
ret