Function at 0x4050c0
Capabilities:
Check if file exists
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x43a6d8
mov eax, dword fs:[0]
push eax
sub esp, 0x68
push ebx
push esi
push edi
mov eax, dword [0x44c6c8]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov esi, ecx
mov edi, dword [ebp + 0xc]
lea ecx, [esp + 0x40]
call fcn.0041425b
mov ebx, dword [ebp + 8]
push 0
add ebx, 0x4620
push 4
push ebx
mov dword [esp + 0x8c], 0
call fcn.00426500
mov eax, dword [ebp + 8]
add esp, 0xc
mov byte [ebx], 5
mov byte [eax + 0x4621], 0
mov byte [eax + 0x4622], 0
mov byte [eax + 0x4623], 0x17
test edi, edi
je 0x405198
mov eax, edi
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405140
sub eax, edx
sar eax, 1
je 0x405198
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x405198
mov ecx, edi
call fcn.00404f40
test eax, eax
je 0x405198
push 0
push 0x40
push edi
lea ecx, [esp + 0x4c]
call fcn.004146d3
lea ecx, [esp + 0x40]
test eax, eax
je 0x40519c
call fcn.00414146
test edx, edx
ja 0x4051c3
jb 0x40518f
cmp eax, 0x40a
jae 0x4051c3
lea ecx, [esp + 0x40]
call fcn.004141f5
lea ecx, [esp + 0x40]
mov dword [esp + 0x80], 0xffffffff
call fcn.00414363
xor eax, eax
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0x615
push esi
lea ecx, [esp + 0x48]
call fcn.00413f4f
xor eax, eax
xor byte [eax + esi], 8
inc eax
cmp eax, 6
jl 0x4051d4
mov edi, 4
mov ecx, ebx
lea eax, [esi + 6]
lea ebx, [edi - 3]
jmp 0x4051f0
xor byte [eax], 8
mov dl, byte [eax]
cmp dl, byte [ecx]
jle 0x405202
mov edx, dword [ebp + 8]
mov dword [edx + 0x461c], ebx
add eax, ebx
add ecx, ebx
sub edi, ebx
jne 0x4051f0
lea eax, [esi + 0xa]
mov ecx, 0x200
xor byte [eax], 8
add eax, ebx
sub ecx, ebx
jne 0x405212
lea eax, [esi + 0x20a]
mov ecx, 0x100
xor byte [eax], 8
add eax, ebx
sub ecx, ebx
jne 0x405226
lea eax, [esi + 0x30a]
mov ecx, 0x100
lea ebx, [ebx]
xor byte [eax], 8
add eax, ebx
sub ecx, ebx
jne 0x405240
mov eax, dword [ebp + 8]
cmp dword [eax + 0x461c], ecx
je 0x405820
lea edx, [esi + 0x40a]
mov eax, edx
mov ecx, 4
xor byte [eax], 8
inc eax
sub ecx, ebx
jne 0x405265
lea edi, [esi + 0x40e]
mov eax, edi
mov ecx, 7
lea ebx, [ebx]
xor byte [eax], 8
inc eax
sub ecx, ebx
jne 0x405280
mov ebx, dword [ebp + 8]
push 4
push edx
lea ecx, [ebx + 0x4624]
push 4
push ecx
call fcn.0042466e
mov al, byte [ebx + 0x4627]
add esp, 0x10
cmp al, 2
jne 0x40546b
xor esi, esi
push esi
call fcn.00424ffe
fldz
mov dword [esp + 0x20], edx
fstp qword [esp + 0x28]
add esp, 4
lea edx, [esp + 0x18]
mov dword [esp + 0x18], eax
push edx
lea eax, [esp + 0x54]
push eax
mov dword [esp + 0x34], esi
call fcn.0042504f
add esp, 8
cmp eax, esi
jne 0x40534c
mov ecx, dword [esp + 0x64]
movzx eax, word [esp + 0x68]
mov edx, dword [esp + 0x60]
add ecx, 0x76c
mov word [esp + 0x30], cx
movzx ecx, word [esp + 0x5c]
mov word [esp + 0x34], ax
movzx eax, word [esp + 0x54]
inc edx
mov word [esp + 0x36], cx
movzx ecx, word [esp + 0x50]
mov word [esp + 0x32], dx
mov dx, word [esp + 0x58]
mov word [esp + 0x3a], ax
lea eax, [esp + 0x24]
mov word [esp + 0x3c], cx
mov word [esp + 0x38], dx
push eax
lea ecx, [esp + 0x34]
xor edx, edx
push ecx
mov word [esp + 0x46], dx
call fcn.004070e0
add esp, 8
test eax, eax
je 0x40534c
xor eax, eax
jmp 0x405351
mov eax, 1
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x1c], ecx
mov ecx, edi
lea edi, [esp + 0x30]
mov dword [esp + 0x18], edx
mov dword [esp + 0x20], eax
call fcn.004064d0
mov edx, dword [eax]
lea ecx, [ebx + 0x462c]
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov eax, dword [eax + 8]
mov dword [ecx + 8], eax
cmp dword [ebx + 0x4634], esi
jne 0x405452
push ecx
lea esi, [esp + 0x34]
lea eax, [esp + 0x1c]
call fcn.00407040
fldz
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov eax, dword [eax + 8]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
fld qword [esp + 0x24]
fcom st(1)
mov dword [esp + 0x2c], eax
fnstsw ax
fld qword [0x442b40]
fld qword [0x442b68]
test ah, 5
jp 0x4053d3
fld st(0)
jmp 0x4053d5
fld st(1)
fadd st(3)
call fcn.004287f0
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fcomp qword [0x442b88]
fnstsw ax
test ah, 1
jne 0x405416
fstp st(2)
mov byte [ebx + 0x4626], 0
fstp st(2)
mov byte [ebx + 0x4627], 0
fstp st(1)
mov dword [ebx + 0x4638], 0
fstp st(0)
jmp 0x405820
fxch st(3)
fcomp st(2)
fnstsw ax
test ah, 0x41
jne 0x405425
fstp st(0)
jmp 0x405427
fstp st(2)
faddp st(1)
fld qword [0x442b70]
fmul st(1), st(0)
fxch st(1)
call fcn.004287f0
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fsubp st(1)
call fcn.004287f0
mov dword [ebx + 0x4638], eax
jmp 0x405820
mov byte [ebx + 0x4626], 0
mov byte [ebx + 0x4627], 0
mov dword [ebx + 0x4638], esi
jmp 0x405820
test al, al
jne 0x405820
mov ecx, ebx
cmp byte [ecx + 0x4625], 2
jne 0x405820
mov edx, ecx
cmp byte [edx + 0x4626], al
jle 0x405820
push 0
call fcn.00424ffe
fldz
mov dword [esp + 0x1c], eax
fstp qword [esp + 0x28]
add esp, 4
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x54]
push ecx
mov dword [esp + 0x34], 0
mov dword [esp + 0x24], edx
call fcn.0042504f
add esp, 8
test eax, eax
jne 0x405532
mov edx, dword [esp + 0x64]
movzx ecx, word [esp + 0x68]
mov eax, dword [esp + 0x60]
add edx, 0x76c
mov word [esp + 0x30], dx
movzx edx, word [esp + 0x5c]
mov word [esp + 0x34], cx
movzx ecx, word [esp + 0x54]
inc eax
mov word [esp + 0x36], dx
movzx edx, word [esp + 0x50]
mov word [esp + 0x32], ax
mov ax, word [esp + 0x58]
mov word [esp + 0x3a], cx
lea ecx, [esp + 0x24]
mov word [esp + 0x3c], dx
mov word [esp + 0x38], ax
push ecx
lea edx, [esp + 0x34]
xor eax, eax
push edx
mov word [esp + 0x46], ax
call fcn.004070e0
add esp, 8
test eax, eax
je 0x405532
xor eax, eax
jmp 0x405537
mov eax, 1
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x30], ecx
mov ecx, edi
lea edi, [esp + 0x18]
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], eax
call fcn.004064d0
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov eax, dword [eax + 8]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x405820
call fcn.0040ba84
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40558c
push 0x80004005
call fcn.004044b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
mov byte [esp + 0x80], 1
call fcn.0040ba84
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4055be
push 0x80004005
call fcn.004044b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebx, [eax + 0x10]
mov dword [esp + 0x14], ebx
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x34]
mov byte [esp + 0x84], 2
call fcn.00406d70
mov byte [esp + 0x80], 3
mov eax, dword [eax]
lea esi, [eax - 0x10]
add ebx, 0xfffffff0
cmp esi, ebx
je 0x405699
cmp dword [ebx + 0xc], 0
jl 0x40568b
mov ecx, dword [esi]
cmp ecx, dword [ebx]
jne 0x40568b
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
call eax
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x40562d
cmp eax, dword [esi]
jne 0x40562d
mov edi, esi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x405669
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
jne 0x405646
call fcn.004041e0
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax + 2]
push ecx
add esi, 0x10
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [edi + 0x10]
push eax
call fcn.0042466e
add esp, 0x10
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405682
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
add edi, 0x10
mov dword [esp + 0x14], edi
jmp 0x405699
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x1c]
call fcn.00403df0
mov byte [esp + 0x80], 2
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4056c1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x28]
call fcn.00406d70
mov byte [esp + 0x80], 4
mov eax, dword [eax]
mov ebx, dword [esp + 0x10]
lea esi, [eax - 0x10]
add ebx, 0xfffffff0
cmp esi, ebx
je 0x405788
cmp dword [ebx + 0xc], 0
jl 0x40577a
mov ecx, dword [esi]
cmp ecx, dword [ebx]
jne 0x40577a
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
call eax
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x40571c
cmp eax, dword [esi]
jne 0x40571c
mov edi, esi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x405758
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
jne 0x405735
call fcn.004041e0
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax + 2]
push ecx
add esi, 0x10
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [edi + 0x10]
push eax
call fcn.0042466e
add esp, 0x10
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405771
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
add edi, 0x10
mov dword [esp + 0x10], edi
jmp 0x405788
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x18]
call fcn.00403df0
mov byte [esp + 0x80], 2
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4057b0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
push esi
push edi
call fcn.00424bff
add esp, 8
test eax, eax
jge 0x4057d8
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov byte [ecx + 0x4626], 0
call fcn.00405f40
lea eax, [esi - 0x10]
mov byte [esp + 0x80], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4057fc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [esp + 0x80], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405820
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x40]
call fcn.004141f5
lea ecx, [esp + 0x40]
mov dword [esp + 0x80], 0xffffffff
call fcn.00414363
mov eax, 1
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8