Function at 0x4035f0
Capabilities:
Get common file path
Resolve function by parsing pe exports
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2cac
call fcn.00422160
mov eax, dword [0x4a9538]
push ebx
inc eax
push esi
push edi
mov dword [0x4a9538], eax
cmp eax, 0x30
jge 0x428171
mov edi, dword [ebp + 0xc]
mov bl, 1
lea eax, [esp + 0x28]
mov dword [esp + 0x14], 0
mov byte [esp + 0x11], 1
mov byte [esp + 0x13], bl
mov byte [esp + 0x12], 0
call fcn.0040da00
lea esi, [esp + 0x18]
call fcn.00401d10
push esi
mov eax, 0x2000
lea ecx, [esp + 0x2c]
call fcn.0040e060
test al, al
je 0x428198
mov byte [esp + 0x10], 0
lea ecx, [esp + 0x18]
call fcn.00402480
cmp byte [esp + 0x10], 0
jne 0x4281a2
lea ecx, [esp + 0x698]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea edx, [esp + 0x6c]
push edx
lea eax, [esp + 0x74]
push eax
push 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
lea ecx, [esp + 0x28a8]
push ecx
lea edx, [esp + 0x2ab4]
push edx
lea eax, [esp + 0x498]
push eax
lea ecx, [esp + 0x70]
push ecx
lea edx, [esp + 0x80]
push edx
call fcn.0041392e
add esp, 0x14
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x284]
push ecx
call fcn.00411487
lea edx, [esp + 0x498]
push edx
lea eax, [esp + 0x28c]
push eax
call fcn.00411456
add esp, 0x10
lea ecx, [esp + 0x280]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp bl, 1
jne 0x4282d8
xor edx, edx
lea esi, [esp + 0x40]
mov word [esp + 0x8a8], dx
call fcn.00403580
mov al, byte [esp + 0x54]
test al, 3
jne 0x4281f2
test al, 4
jne 0x4281d3
xor ebx, ebx
push 0x10
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], 0x10
call fcn.004114f7
add esp, 4
push 4
mov dword [esp + 0x1c], eax
mov byte [eax], bl
call fcn.004114f7
add esp, 4
cmp eax, ebx
je 0x4281e9
mov dword [eax], 1
mov dword [esp + 0x24], eax
lea edi, [esp + 0x18]
lea eax, [esp + 0x28]
call fcn.004039d0
test al, al
je 0x40395c
lea edx, [esp + 0x40]
push edx
push edi
call fcn.00403d20
mov esi, dword [esp + 0x24]
dec dword [esi]
jne 0x4037aa
mov ecx, dword [esp + 0x18]
push ecx
call fcn.004110fc
add esp, 4
push esi
call fcn.004110fc
add esp, 4
mov al, 1
test al, al
je 0x40396c
mov eax, dword [esp + 0x44]
cmp eax, 0xffe
ja 0x428208
mov edx, dword [esp + 0x40]
push edx
lea eax, [esp + 0x8ac]
push eax
call fcn.00411487
inc dword [esp + 0x1c]
add esp, 8
xor esi, esi
xor edi, edi
movzx ebx, word [esp + esi*2 + 0x8a8]
push ebx
call fcn.0041316e
add esp, 4
test eax, eax
je 0x403806
push ebx
call fcn.00413145
add esp, 4
test eax, eax
jne 0x403946
cmp word [esp + esi*2 + 0x8a8], di
je 0x40382d
mov cx, word [esp + esi*2 + 0x8a8]
mov word [esp + edi*2 + 0x8a8], cx
inc esi
inc edi
cmp word [esp + esi*2 + 0x8a8], 0
jne 0x403810
xor edx, edx
lea eax, [esp + 0x8a8]
mov word [esp + edi*2 + 0x8a8], dx
call fcn.00403bd0
test al, al
je 0x4282b4
lea eax, [esp + 0x8a8]
push eax
call fcn.004110e1
add esp, 4
test eax, eax
je 0x4038a0
lea esi, [eax - 1]
test esi, esi
js 0x403896
jmp 0x403870
movzx edi, word [esp + esi*2 + 0x8a8]
push edi
call fcn.0041316e
add esp, 4
test eax, eax
je 0x403896
push edi
call fcn.00413145
add esp, 4
test eax, eax
jne 0x428248
xor ecx, ecx
mov word [esp + esi*2 + 0x8aa], cx
lea edx, [esp + 0x8a8]
push edx
mov byte [esp + 0x14], 0
call fcn.004110e1
add esp, 4
cmp eax, 2
jle 0x4038d8
mov esi, eax
mov ax, word [esp + esi*2 + 0x8a4]
and ax, 0x7f
movzx ecx, ax
push ecx
call fcn.00413145
add esp, 4
test eax, eax
jne 0x40394c
cmp byte [esp + 0x12], 1
je 0x42826a
mov esi, dword [ebp + 8]
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x78]
push ecx
lea edx, [esp + 0x8b4]
push edx
mov ecx, esi
call fcn.00403c50
cmp eax, 3
jne 0x428280
mov eax, dword [ebp + 0x10]
mov ecx, dword [esp + 0x14]
push eax
push ecx
lea ebx, [esp + 0x8b0]
call fcn.00403c80
cmp byte [esp + 0x10], 1
je 0x4282aa
mov byte [esp + 0x12], 0
cmp byte [esp + 0x11], 1
jne 0x4282d8
mov bl, byte [esp + 0x13]
jmp 0x403702
inc esi
jmp 0x4037e0
cmp word [esp + esi*2 + 0x8a6], 0x5f
jne 0x4038d8
jmp 0x428254
lea esi, [esp + 0x18]
call fcn.00401590
xor al, al
jmp 0x4037ac
lea esi, [esp + 0x28]
call fcn.0040d9c0
lea eax, [esp + 0x698]
push eax
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call fcn.0040d9c0
lea ecx, [esp + 0x40]
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
call fcn.00402480
call fcn.0040d9c0
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.004110fc
mov al, byte [esp + 0x15]
add esp, 4
dec dword [0x4a9538]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
xor dl, byte [edi - 0x2032d07f]
mov esi, 0x8fbccd94
lcall 0x4d28, 0xc5031534
aaa
insb byte es:[edi], dx
add byte [ebx], 0x24
cmp dh, byte [edi + 0x1503c5]
out dx, eax
xchg edi, eax
arpl cx, ax
sub dword [edi + edx], esp
xor eax, 0x80fae33d
jg 0x4281aa
pop es
inc edx
enter 0x1eb9, 0x17
jp 0x428149
cli
xchg ebx, eax
jg 0x428113
xchg edx, eax
out 0x63, al
add byte [ebp + 0x1924c60c], cl
wait
or dword [eax + 0x11], eax
xor byte [eax], dl
cdq
add ah, byte [esi]
mov al, byte [0x4c0000e]
mov esp, eax
adc byte [edi + 0x11085009], cl
nop
inc eax
dec eax
std
and ch, byte [eax - 0x38]
xor cl, byte [0x44e0090]
sub al, bh
mov esp, 0x2cb31014
cmp byte [eax], al
shl dword [ebx + 0x72], 0x42
mov dl, byte [ebp - 0x44]
jl 0x428195
mov esp, 0x4406fd7c
push es
inc esp
and eax, dword [ecx]
sbb edx, 0x777854ae
inc edi
aam 0x9d
cmpsb byte [esi], byte es:[edi]
leave
or al, 0xa3
movsd dword es:[edi], dword [esi]
adc al, 0x31
loope 0x428157
cmp edx, ebp
cmp dl, byte [ecx]
arpl word [eax + ebx*2 + 0x6ec89e31], ax
cwde
xchg byte [ebx - 0x7e], dl
mov ah, byte [eax + 0x451dd974]
cmp eax, dword [esi - 0x63d69626]
call 0xacc2b4d3
or esi, dword [edi]
mov ebp, 0x6000216d
and dword [eax], eax
pushal
pop ds
xchg esi, eax
test dword [ebp + 0x10], eax
invalid
imul edx, dword [eax + ebp*8 + 0x65], 0xffffffe4
out dx, al
mov edi, 0x4086776d
cmp al, 0xd3
and ecx, dword [ebx]
pop esp
xchg ebp, eax
cmp esp, edx
invalid
xchg byte [eax + 0x3c], al
shl dword [ebx], cl
or ebx, dword [ebp + edx*4 + 0x39]
aam 0xfe
xor edi, eax
add eax, 0x8f496602
adc al, 0xa7
std
out 0xec, eax
in al, dx
push 0xdbda5441
mov byte [ecx], al
cmp ebp, ebp
dec ebp
cld
xchg edx, eax
ror byte [esi + 0x44], 1
invalid
dec eax
lea edi, [ecx]
rcl dword [edx - 0x3853eb35], cl
paddusw mm2, qword [edx - 0x1f]
or ecx, dword [ecx + edi*2 + 0x19449460]
imul edi, dword [ecx + ebx*8], 0xffffffbf
inc ebx
cmp eax, 0xb997a7a9
imul ecx, ecx, 0xffffffc1
jbe 0x428230
sub ebx, dword [ecx - 9]
je 0x4282c7
pop ecx
div dword [edi + ebp*2 + 4]
add al, 0x39
leave
add al, 4
cmp ecx, ecx
cld
movsb byte es:[edi], byte [esi]
jno 0x428266
push es
cmovle esp, dword [eax + 0x50]
cmp esi, dword [ecx + 0x6a]
int1
push 0xfffffffffffffff1
mov eax, 0x3ecad1fd
sub al, 0x3c
ror edx, 1
sub al, 0x3c
lodsb al, byte [esi]
test al, 0x4e
dec esi
push edi
or edx, dword [ebx]
int1
out dx, eax
or al, byte [ecx]
cli
add dword [ebp - 0x402411e], 0xffffff8b
cmc
mov esi, ebp
clc
jne 0x42825f
xchg edi, eax
clc
das
aas
invalid
sti
test dword [edi], eax
ret 0xe909
invalid
xchg edi, eax
mov dword [0x1d10562], eax
jns 0x4282fa
neg ebx
loop 0x428271
ficom word [edi + 0x3d]
push ebx
je 0x42830c
xor ecx, ecx
leave
fld qword [0xcaefe427]
pop es
push 0x42036f6e
iretd
fdiv dword [eax]
add byte [edi + 0x15], ch
mov eax, dword [0x6b7c0076]
bound edi, qword [0x48430272]
out 0xa8, eax
ret