Function at 0x1004e7f
Capabilities:
Check if file exists
Get file attributes
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x1007004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
xor eax, eax
push 0x1002964
mov edi, 0x10022d4
push edi
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x34], eax
call fcn.01003bbd
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call esi
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x1004edc
push 0x10022c0
push 0x100198c
call fcn.01002af7
jmp 0x100515d
push 0x1002954
push edi
call fcn.01003bbd
push eax
call esi
mov dword [ebp - 0x30], eax
test eax, eax
je 0x1004ec8
push 0x100293c
push edi
call fcn.01003bbd
push eax
call esi
mov dword [ebp - 0x38], eax
test eax, eax
je 0x1004ec8
push 0x1002924
push edi
call fcn.01003bbd
push eax
call esi
test eax, eax
je 0x1004ec8
push 0x100290c
push edi
call fcn.01003bbd
push eax
call esi
xor edi, edi
mov dword [ebp - 0x2c], eax
cmp eax, edi
je 0x1004ec8
push 0xf0000000
push 1
push edi
push edi
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x1004f55
push 0x10028a8
call fcn.01002af7
jmp 0x100515e
push edi
push edi
push dword [ebp - 0x24]
lea esi, [ebx + 0xa08]
push 1
push esi
call dword [ebp - 0x1c]
mov dword [ebp - 0x20], eax
cmp eax, 0xffffffff
jne 0x1004f89
xor eax, eax
call fcn.01003ca6
push eax
push esi
push 0x1002868
call fcn.01002af7
add esp, 0xc
jmp 0x100515f
mov esi, dword [ebx + 0x1468]
mov dword [ebp - 0x1c], edi
mov edi, 0x10010001
jmp 0x1004fec
push esi
call dword [sym.imp.msvcrt.dll__wcslwr]
inc dword [ebp - 0x1c]
push dword [ebp - 0x1c]
lea eax, [esi + 0x208]
push 0x1002858
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, esi
add esp, 0x10
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x1004fc0
sub eax, ecx
sar eax, 1
push esi
lea eax, [eax + eax + 2]
push eax
push edi
lea eax, [esi + 0x208]
push eax
push dword [ebp - 0x20]
call dword [ebp - 0x2c]
test eax, eax
je 0x100502e
mov esi, dword [esi + 0x218]
test esi, esi
jne 0x1004f99
mov ecx, 0x1002808
mov eax, ecx
lea esi, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x1004ffa
sub eax, esi
push ecx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
push edi
push 0x1002800
push dword [ebp - 0x20]
call dword [ebp - 0x2c]
test eax, eax
jne 0x1005043
call fcn.01003ca6
push eax
push 0x10027b8
jmp 0x1004ed2
xor eax, eax
call fcn.01003ca6
push eax
push dword [ebp - 0x1c]
push 0x1002768
jmp 0x1004f7c
mov eax, dword [ebx + 0x146c]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x100512b
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov esi, 0x100d938
mov edi, 0x100e340
push dword [ebp - 0x28]
push 0x104
push esi
call fcn.01005617
push dword [ebp - 0x1c]
push 0x104
push edi
call fcn.01005617
mov eax, dword [ebp - 0x1c]
add esp, 0x18
add eax, 0x208
push eax
push esi
call ebx
push edi
push esi
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
cmp eax, 0xffffffff
jne 0x10050a7
push 0x1002720
jmp 0x100510d
lea eax, [ebp - 0x18]
push eax
call fcn.01004a12
test eax, eax
je 0x1005107
push 0x80
push esi
push 0x10
push dword [ebp - 0x28]
xor eax, eax
push 0x100e548
mov word [0x100e548], ax
call dword [sym.imp.SHLWAPI.dll_PathRelativePathToW]
push 0x100e548
push 0x10026ec
call fcn.01002af7
pop ecx
pop ecx
push edi
push dword [ebp - 0x20]
lea ecx, [ebp - 0x18]
call fcn.01004aa7
test eax, eax
je 0x10050ff
push 0x10026d0
call fcn.01002af7
jmp 0x1005113
push edi
push 0x1002680
jmp 0x100510d
push esi
push 0x1002628
call fcn.01002af7
pop ecx
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x410]
pop ecx
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x1005064
mov ebx, dword [ebp - 0x28]
push dword [ebp - 0x20]
call dword [ebp - 0x38]
test eax, eax
jne 0x1005145
call fcn.01003ca6
push eax
push 0x10025f0
jmp 0x1004ed2
add ebx, 0xe08
push ebx
push 0x10025b4
call fcn.01002af7
mov dword [ebp - 0x34], 1
pop ecx
pop ecx
xor esi, esi
cmp dword [ebp - 0x24], esi
je 0x1005170
push esi
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
cmp dword [ebp - 0x20], esi
pop edi
pop esi
pop ebx
je 0x100517e
push dword [ebp - 0x20]
call dword [ebp - 0x30]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x34]
xor ecx, ebp
call fcn.010054ac
leave
ret 4