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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x418feb
mov eax, dword fs:[0]
push eax
sub esp, 0x184
mov eax, dword [0x423040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18c], esi
mov dword [ebp - 0x190], eax
cmp dword [esi + 0x10], 0
jne 0x403883
mov eax, dword [0x423030]
cmp eax, 0x423030
je 0x40387c
test byte [eax + 0x1c], 4
je 0x40387c
cmp byte [eax + 0x19], 5
jb 0x40387c
cmp dword [esi + 0x14], 0x10
jb 0x403866
mov esi, dword [esi]
push esi
push 0x41a498
push 0xe
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00402c70
add esp, 0x14
xor al, al
jmp 0x403bf6
push esi
lea ecx, [ebp - 0x40]
call fcn.00402400
cmp dword [ebp - 0x2c], 0x10
lea eax, [ebp - 0x40]
mov dword [ebp - 4], 0
jb 0x40389f
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsRelativeA]
cmp eax, 1
jne 0x403b02
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
push 0
mov byte [ebp - 4], al
lea ecx, [ebp - 0x28]
push 0x104
lfence
call fcn.00403d40
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
jb 0x4038e2
mov eax, dword [ebp - 0x28]
push dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push eax
push 0x400000
call esi
mov ecx, dword [ebp - 0x18]
cmp eax, ecx
jbe 0x40396a
dec eax
cmp eax, ecx
ja 0x403914
cmp dword [ebp - 0x14], 0x10
lea ecx, [ebp - 0x28]
jb 0x40390b
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x18], eax
mov byte [ecx + eax], 0
jmp 0x403924
sub eax, ecx
lea ecx, [ebp - 0x28]
push 0
push eax
lfence
call fcn.00403d40
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
jb 0x403930
mov eax, dword [ebp - 0x28]
push dword [ebp - 0x18]
push eax
push 0x400000
call esi
mov ecx, dword [ebp - 0x18]
cmp eax, ecx
jbe 0x40396a
mov eax, dword [0x423030]
cmp eax, 0x423030
je 0x4039a7
test byte [eax + 0x1c], 4
je 0x4039a7
cmp byte [eax + 0x19], 5
jb 0x4039a7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x41a498
push 0xf
jmp 0x403994
test eax, eax
jne 0x4039b6
mov eax, dword [0x423030]
cmp eax, 0x423030
je 0x4039a7
test byte [eax + 0x1c], 4
je 0x4039a7
cmp byte [eax + 0x19], 5
jb 0x4039a7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x41a498
push 0x10
mov eax, dword [0x423030]
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00404180
add esp, 0x14
lea ecx, [ebp - 0x28]
call fcn.00401890
xor bl, bl
jmp 0x403bec
cmp eax, ecx
ja 0x4039cf
cmp dword [ebp - 0x14], 0x10
lea ecx, [ebp - 0x28]
jb 0x4039c6
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x18], eax
mov byte [ecx + eax], 0
jmp 0x4039df
sub eax, ecx
lea ecx, [ebp - 0x28]
push 0
push eax
lfence
call fcn.00403d40
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x58]
call fcn.00402400
mov edi, eax
cmp dword [edi + 0x14], 0x10
mov esi, dword [edi + 0x10]
jb 0x4039f8
mov edi, dword [edi]
test esi, esi
je 0x403a68
push 0x100
lea eax, [ebp - 0x188]
push 0
push eax
call fcn.00407790
add esp, 0xc
mov ecx, 0x41a4ac
mov edx, 2
lea esp, [esp]
movzx eax, byte [ecx]
lea ecx, [ecx + 1]
mov byte [ebp + eax - 0x188], 1
sub edx, 1
jne 0x403a20
lea eax, [esi - 1]
cmp eax, 0xffffffff
jb 0x403a3e
or eax, 0xffffffff
lea esi, [eax + edi]
movzx eax, byte [esi]
mov al, byte [ebp + eax - 0x188]
test al, al
jne 0x403a64
nop
cmp esi, edi
je 0x403a68
movzx eax, byte [esi - 1]
dec esi
mov al, byte [ebp + eax - 0x188]
test al, al
je 0x403a50
sub esi, edi
jmp 0x403a6b
or esi, 0xffffffff
lea ecx, [ebp - 0x58]
call fcn.00401890
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x88]
call fcn.00402400
mov dword [ebp - 0x48], 0
inc esi
mov dword [ebp - 0x44], 0xf
mov byte [ebp - 0x58], 0
mov ecx, dword [eax + 0x10]
mov byte [ebp - 4], 2
cmp ecx, esi
jb 0x403aa2
mov ecx, esi
cmp dword [eax + 0x14], 0x10
jb 0x403aaa
mov eax, dword [eax]
push ecx
push eax
lea ecx, [ebp - 0x58]
call fcn.00401d50
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x70]
push eax
call fcn.00403250
add esp, 0xc
lea ecx, [ebp - 0x40]
push eax
call fcn.00403480
lea ecx, [ebp - 0x70]
call fcn.00401890
lea ecx, [ebp - 0x58]
call fcn.00401890
lea ecx, [ebp - 0x88]
call fcn.00401890
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0
call fcn.00401890
mov esi, dword [ebp - 0x18c]
lea eax, [ebp - 0x40]
push eax
call fcn.00403c20
add esp, 4
lea edx, [ebp - 0x40]
cmp dword [ebp - 0x2c], 0x10
jb 0x403b1a
mov edx, dword [ebp - 0x40]
mov ecx, edx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403b31
sub ecx, edi
push ecx
push edx
lea ecx, [ebp - 0x28]
call fcn.00401d50
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 4
jb 0x403b54
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x403b6c
shr ebx, 4
not bl
and bl, 1
jmp 0x403b74
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor bl, bl
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0
call fcn.00401890
test bl, bl
jne 0x403bcb
mov eax, dword [0x423030]
cmp eax, 0x423030
je 0x403bc7
test byte [eax + 0x1c], 4
je 0x403bc7
cmp byte [eax + 0x19], 5
jb 0x403bc7
cmp dword [esi + 0x14], 0x10
jb 0x403ba4
mov esi, dword [esi]
cmp dword [ebp - 0x2c], 0x10
lea ecx, [ebp - 0x40]
jb 0x403bb0
mov ecx, dword [ebp - 0x40]
push esi
push ecx
push 0x41a498
push 0x11
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.004041b0
add esp, 0x18
xor bl, bl
jmp 0x403bec
mov ecx, dword [ebp - 0x190]
lea eax, [ebp - 0x40]
cmp ecx, eax
je 0x403bea
cmp dword [ebp - 0x2c], 0x10
jb 0x403be1
mov eax, dword [ebp - 0x40]
push dword [ebp - 0x30]
push eax
call fcn.00401d50
mov bl, 1
lea ecx, [ebp - 0x40]
call fcn.00401890
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00405962
mov esp, ebp
pop ebp
ret