Function at 0x408f80
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 0x41e678
mov eax, dword fs:[0]
push eax
sub esp, 0xd8
mov eax, dword [0x425ee0]
xor eax, esp
mov dword [esp + 0xd0], eax
push ebx
push esi
push edi
mov eax, dword [0x425ee0]
xor eax, esp
push eax
lea eax, [esp + 0xe8]
mov dword fs:[0], eax
fldz
xor ebx, ebx
mov dword [esp + 0x50], ebx
xor eax, eax
mov word [esp + 0x30], ax
fstp dword [esp + 0x2c]
fldz
xor ecx, ecx
fst qword [esp + 0x54]
xor edx, edx
mov word [esp + 0x38], cx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x24], ebx
fstp qword [esp + 0x6c]
xor edi, edi
xor esi, esi
mov word [esp + 0x28], dx
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], esi
mov dword [esp + 0x98], 0xf
mov dword [esp + 0x94], ebx
mov byte [esp + 0x84], al
push 0x118
mov dword [esp + 0xf4], ebx
call fcn.0040b489
push eax
mov dword [esp + 0x84], eax
call fcn.00401810
add esp, 8
lea ecx, [ecx]
push ebx
call fcn.0040b16a
add esp, 4
cmp edx, esi
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], edx
jg 0x409067
jl 0x40905b
cmp eax, edi
jae 0x409067
xor edi, edi
xor esi, esi
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], esi
mov ecx, eax
sub ecx, edi
mov ebx, edx
sbb ebx, esi
mov dword [esp + 0x20], ebx
js 0x409afd
jg 0x409087
cmp ecx, 0x708
jbe 0x409afd
movzx ecx, word [esp + 0x30]
mov dword [esp + 0x48], edx
mov edx, dword [esp + 0x14]
sub ecx, edx
add ecx, dword [esp + 0x24]
mov edi, eax
mov word [0x4235c8], cx
mov dword [esp + 0x44], eax
fld qword [0x423b28]
movzx eax, word [esp + 0x38]
movsx ecx, ax
mov edx, 0xf3b93e6f
sub edx, ecx
mov dword [esp + 0x18], edx
shr edi, 9
push 0x408
fild dword [esp + 0x1c]
lea ebx, [edi + 0x55]
push 0x423638
mov dword [esp + 0x70], 0
fsubp st(1)
mov dword [esp + 0x44], edi
mov dword [esp + 0x24], ebx
fstp qword [0x423b28]
call fcn.004013d0
push 0xd
push 0x424300
mov dword [esp + 0x70], eax
call fcn.004013d0
mov esi, eax
movzx eax, word [0x423cd8]
movzx ecx, word [esp + 0x48]
inc dword [esp + 0x48]
cwde
movsx edx, cx
sub edx, eax
add edx, 0x25b84c46
add esp, 0x10
mov dword [esp + 0x40], esi
cmp edx, 0xb06b4bde
je 0x409159
fld dword [0x423c68]
mov eax, dword [esp + 0x50]
fadd qword [0x41f9e0]
mov dword [esp + 0x18], eax
fadd qword [0x41f9d8]
fild dword [esp + 0x18]
faddp st(1)
call fcn.0040b240
mov dword [esp + 0x50], eax
jmp 0x409177
fld dword [0x423c60]
mov ecx, dword [esp + 0x50]
sub ecx, 0x1a404b2
mov dword [esp + 0x18], ecx
fisub dword [esp + 0x18]
fstp dword [0x423c60]
push 0xaf1
push 0x4243e8
call fcn.004013d0
push 0x31e
push 0x423f28
mov dword [esp + 0x28], eax
call fcn.004013d0
add esp, 0x10
mov dword [esp + 0x64], eax
cmp edi, ebx
je 0x4096c5
jmp 0x4091b0
fld qword [esp + 0x6c]
fadd qword [0x41f9d0]
call fcn.0040b240
mov word [0x423f10], ax
fld qword [esp + 0x6c]
fsub qword [0x41f340]
mov edx, dword [0x4276e0]
push 0
push edx
fstp qword [esp + 0x74]
call fcn.00402130
add esp, 8
test eax, eax
jne 0x4091fd
mov eax, dword [0x4276e8]
mov ecx, dword [0x427224]
push eax
push ecx
call fcn.004010c0
add esp, 8
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x18]
push edx
push eax
push ecx
lea edx, [esp + 0xa8]
push edx
call fcn.00403bb0
fld qword [esp + 0x64]
fsub qword [0x41f340]
push 0x8b
push 0x425d38
fstp qword [esp + 0x6c]
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
fsub qword [esp + 0x6c]
fadd qword [0x41f9c8]
fadd dword [esp + 0x44]
fstp dword [esp + 0x44]
call fcn.004013d0
fld dword [0x42429c]
mov cx, word [0x423c10]
fsubr qword [0x41f9c0]
movsx edx, cx
mov dword [esp + 0x28], edx
add esp, 0x18
mov ebx, eax
fild dword [esp + 0x10]
faddp st(1)
call fcn.0040b240
mov word [0x423c10], ax
mov eax, dword [esp + 0x40]
mov esi, eax
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409290
mov edi, ebx
sub eax, esi
dec edi
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4092a0
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 + 0x88]
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xa8]
push ebx
push ecx
call fcn.004087a0
xor edx, edx
push 0x8b
push edx
mov word [esp + 0x2c], dx
mov dword [esp + 0x2c], edx
push ebx
call fcn.0040b3c0
fld dword [0x423c0c]
fadd qword [0x41f340]
fstp dword [0x423c0c]
fld dword [0x423c0c]
fsubr qword [0x41f398]
call fcn.0040b240
push ebx
mov word [esp + 0x34], ax
call fcn.0040b324
mov eax, dword [esp + 0xa8]
add esp, 0x24
cmp dword [esp + 0x98], 0x10
jae 0x409333
lea eax, [esp + 0x84]
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 0x60]
push ecx
push eax
push edx
call fcn.00408330
add esp, 0xc
cmp eax, 9
jl 0x40966d
mov ecx, dword [esp + 0x84]
mov edi, 0x10
cmp dword [esp + 0x98], edi
jae 0x40936e
lea ecx, [esp + 0x84]
mov edx, dword [ecx]
xor ecx, ecx
cmp ecx, dword [esp + 0x78]
jg 0x409399
jl 0x409380
cmp edx, dword [esp + 0x74]
jae 0x409399
fld dword [esp + 0x2c]
fsub qword [0x41f9b8]
call fcn.0040b240
mov dword [0x423cd0], eax
jmp 0x40966d
lea esi, [eax - 1]
cmp esi, dword [esp + 0x94]
jbe 0x4093aa
call fcn.0040c1ac
mov eax, dword [esp + 0x84]
cmp dword [esp + 0x98], edi
jae 0x4093c1
lea eax, [esp + 0x84]
mov byte [eax + esi], 0
mov esi, dword [esp + 0x98]
mov ebx, dword [esp + 0x84]
mov eax, ebx
cmp esi, edi
jae 0x4093e0
lea eax, [esp + 0x84]
lea ecx, [esp + 0x9c]
add eax, 8
lea ebx, [ebx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x409410
test dl, dl
je 0x40940c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x409410
add eax, 2
add ecx, 2
test dl, dl
jne 0x4093f0
xor eax, eax
jmp 0x409415
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40966d
cmp esi, edi
jb 0x4094fd
mov edi, ebx
test ebx, ebx
je 0x409458
mov eax, ebx
cmp esi, 0x10
jae 0x409439
lea eax, [esp + 0x84]
cmp eax, edi
ja 0x409458
mov eax, ebx
cmp esi, 0x10
jae 0x40944b
lea eax, [esp + 0x84]
mov ecx, dword [esp + 0x94]
add eax, ecx
cmp edi, eax
jbe 0x409464
call fcn.0040c1ac
mov ecx, dword [esp + 0x94]
lea esi, [esp + 0x80]
mov ebx, edi
mov edx, dword [esp + 0x98]
mov eax, dword [esp + 0x84]
cmp edx, 0x10
jae 0x409487
lea eax, [esp + 0x84]
lea edi, [eax + ecx]
test edi, edi
je 0x4094be
mov eax, dword [esp + 0x84]
cmp edx, 0x10
jae 0x4094a1
lea eax, [esp + 0x84]
cmp eax, edi
ja 0x4094be
mov eax, dword [esp + 0x84]
cmp edx, 0x10
jae 0x4094b8
lea eax, [esp + 0x84]
add eax, ecx
cmp edi, eax
jbe 0x4094c3
call fcn.0040c1ac
cmp esi, 0xfffffffc
je 0x4094dc
test esi, esi
je 0x4094d7
lea eax, [esp + 0x80]
cmp esi, eax
je 0x4094dc
call fcn.0040c1ac
cmp ebx, edi
je 0x40957e
cmp esi, 0xfffffffc
je 0x40951a
test esi, esi
jne 0x4094f2
call fcn.0040c1ac
cmp dword [esi + 0x18], 0x10
jb 0x409509
mov eax, dword [esi + 4]
jmp 0x40950c
lea edi, [esp + 0x84]
jmp 0x40942b
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp ebx, ecx
jb 0x40951a
call fcn.0040c1ac
mov byte [ebx], 0
cmp esi, 0xfffffffc
je 0x409547
test esi, esi
jne 0x40952b
call fcn.0040c1ac
cmp dword [esi + 0x18], 0x10
jb 0x409536
mov eax, dword [esi + 4]
jmp 0x409539
lea eax, [esi + 4]
mov edx, dword [esi + 0x14]
add edx, eax
cmp ebx, edx
jb 0x409547
call fcn.0040c1ac
fld qword [0x4243d0]
inc ebx
fadd qword [0x41f9b0]
fadd dword [0x423bbc]
fstp dword [0x423bbc]
fld qword [0x4243d0]
mov ecx, dword [esp + 0x94]
fadd qword [0x41f340]
fstp qword [0x4243d0]
jmp 0x40946d
push 0x7e
push 0x425d38
call fcn.004013d0
xor ebx, ebx
push ebx
mov esi, eax
push ebx
lea eax, [esp + 0x90]
push eax
lea ecx, [esp + 0xb0]
push esi
push ecx
call fcn.004087a0
push 0x7e
xor edx, edx
push ebx
mov word [esp + 0x34], dx
mov dword [esp + 0x34], ebx
push esi
call fcn.0040b3c0
fld dword [0x423c0c]
fadd qword [0x41f340]
fstp dword [0x423c0c]
fld dword [0x423c0c]
fsubr qword [0x41f398]
call fcn.0040b240
push esi
mov word [esp + 0x3c], ax
call fcn.0040b324
push 0xc
push 0x425ad8
call fcn.004013d0
add esp, 0x34
mov esi, eax
lea ecx, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x409600
sub eax, ecx
push eax
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0x8c]
call fcn.00404de0
mov edi, eax
xor eax, eax
mov dword [esi], eax
mov word [esp + 0x10], ax
mov dword [esi + 4], eax
mov dword [esp + 0x10], ebx
mov dword [esi + 8], eax
fld dword [0x423c0c]
fadd qword [0x41f340]
fstp dword [0x423c0c]
fld dword [0x423c0c]
fsubr qword [0x41f398]
call fcn.0040b240
push esi
mov word [esp + 0x14], ax
call fcn.0040b324
mov ecx, dword [esp + 0x98]
add ecx, 0xfffffff5
add esp, 4
cmp edi, ecx
je 0x409682
mov eax, dword [esp + 0x3c]
inc eax
mov dword [esp + 0x3c], eax
cmp eax, dword [esp + 0x1c]
jne 0x4091b0
jmp 0x4096c1
push 0xb
push edi
lea ecx, [esp + 0x88]
call fcn.00405aa0
fld dword [0x42429c]
mov dx, word [esp + 0x28]
fsub qword [0x41f9a8]
movsx eax, dx
mov dword [esp + 0x1c], eax
fild dword [esp + 0x1c]
fmulp st(1)
call fcn.0040b240
mov word [esp + 0x28], ax
mov dword [esp + 0x68], 1
mov esi, dword [esp + 0x40]
mov ebx, dword [esp + 0x60]
xor edi, edi
push 0x408
xor ecx, ecx
push edi
mov word [esp + 0x18], cx
mov dword [esp + 0x24], edi
push ebx
call fcn.0040b3c0
fld dword [0x423c0c]
fadd qword [0x41f340]
fstp dword [0x423c0c]
fld dword [0x423c0c]
fsubr qword [0x41f398]
call fcn.0040b240
mov word [esp + 0x1c], ax
push ebx
call fcn.0040b324
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
xor edx, edx
mov word [esp + 0x20], dx
mov dword [esi + 8], eax
mov dword [esp + 0x2c], edi
mov byte [esi + 0xc], al
fld dword [0x423c0c]
fadd qword [0x41f340]
fstp dword [0x423c0c]
fld dword [0x423c0c]
fsubr qword [0x41f398]
call fcn.0040b240
mov word [esp + 0x20], ax
push esi
call fcn.0040b324
mov esi, dword [esp + 0x78]
push 0x31e
xor eax, eax
push edi
mov word [esp + 0x2c], ax
mov dword [esp + 0x38], edi
push esi
call fcn.0040b3c0
fld dword [0x423c0c]
fadd qword [0x41f340]
fstp dword [0x423c0c]
fld dword [0x423c0c]
fsubr qword [0x41f398]
call fcn.0040b240
mov word [esp + 0x30], ax
push esi
call fcn.0040b324
mov esi, dword [esp + 0x3c]
push 0xaf1
xor ecx, ecx
push edi
mov word [esp + 0x3c], cx
mov dword [esp + 0x48], edi
push esi
call fcn.0040b3c0
fld dword [0x423c0c]
fadd qword [0x41f340]
fstp dword [0x423c0c]
fld dword [0x423c0c]
fsubr qword [0x41f398]
call fcn.0040b240
mov word [esp + 0x40], ax
push esi
call fcn.0040b324
mov esi, 1
add dword [esp + 0x58], esi
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x48]
push 0x40
sub edx, eax
lea ecx, [esp + 0xd4]
push edi
mov dword [esp + 0x70], edx
add dword [esp + 0x50], esi
push ecx
call fcn.0040b3c0
add esp, 0x40
cmp dword [esp + 0x68], edi
je 0x409ab7
movzx edx, word [0x4235c8]
mov eax, dword [esp + 0x7c]
imul edx, edx, 0xe7973fb7
push 0x708
push eax
mov word [0x4235c8], dx
call fcn.004023a0
add esp, 8
cmp dword [esp + 0x94], 0x200
jbe 0x409ab7
push 0x370
call fcn.0040b489
mov ecx, dword [esp + 0x18]
imul ecx, ecx, 0xa801a1e7
add esp, 4
mov ebx, eax
push ebx
mov dword [esp + 0x18], ecx
push 0xeb
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push ebx
call fcn.00401e90
mov edx, dword [esp + 0x3c]
add edx, 0x78304297
mov dword [esp + 0x24], edx
fild dword [esp + 0x24]
fsub qword [0x423b78]
call fcn.0040b240
push 3
mov word [esp + 0x3c], ax
push str.E:RI9n
call fcn.004013d0
add dword [esp + 0x24], 0xa1d2f7f2
mov esi, eax
push esi
push ebx
call fcn.0040bc6f
fld dword [esp + 0x44]
fsub qword [0x41f9a0]
mov edi, eax
xor eax, eax
mov word [esi], ax
fstp dword [esp + 0x44]
mov word [esp + 0x28], ax
mov dword [esp + 0x34], eax
mov byte [esi + 2], al
fld dword [0x423c0c]
fadd qword [0x41f340]
fstp dword [0x423c0c]
fld dword [0x423c0c]
fsubr qword [0x41f398]
call fcn.0040b240
push esi
mov word [esp + 0x2c], ax
call fcn.0040b324
mov eax, dword [esp + 0xa0]
add esp, 0x1c
cmp dword [esp + 0x98], 0x10
jae 0x409936
lea eax, [esp + 0x84]
mov ecx, dword [esp + 0x94]
push edi
push 1
push ecx
push eax
call fcn.0040bb29
push edi
call fcn.0040b94b
mov edx, dword [0x4242b8]
add esp, 0x14
push 0x104
lea eax, [ebx + 0x104]
push eax
mov dword [0x423ad8], edx
dec dword [0x4242b8]
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x15
push 0x423c14
call fcn.004013d0
push 0x20
push 0x423b90
mov edi, eax
call fcn.004013d0
mov esi, eax
mov eax, dword [0x4276e0]
push eax
push esi
lea eax, [ebx + 0x104]
push eax
push edi
lea eax, [ebx + 0x208]
push 0x168
push eax
call fcn.0040bfa0
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
xor ecx, ecx
mov word [esp + 0x38], cx
mov dword [esi + 0x18], eax
mov dword [esp + 0x44], eax
mov dword [esi + 0x1c], eax
fld dword [0x423c0c]
fadd qword [0x41f340]
fstp dword [0x423c0c]
fld dword [0x423c0c]
fsubr qword [0x41f398]
call fcn.0040b240
mov word [esp + 0x38], ax
push esi
call fcn.0040b324
xor eax, eax
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
xor edx, edx
mov word [esp + 0x3c], dx
mov dword [edi + 0x10], eax
mov dword [esp + 0x48], edx
mov byte [edi + 0x14], al
fld dword [0x423c0c]
fadd qword [0x41f340]
fstp dword [0x423c0c]
fld dword [0x423c0c]
fsubr qword [0x41f398]
call fcn.0040b240
mov word [esp + 0x3c], ax
push edi
call fcn.0040b324
mov eax, dword [0x4276e0]
push 1
push eax
call fcn.00402130
fld dword [0x423e60]
fsub qword [0x41f998]
fadd dword [0x424370]
lea eax, [ebx + 0x208]
push eax
push ebx
fstp dword [0x424370]
call fcn.004010c0
add esp, 0x40
push 0x370
push 0
push ebx
call fcn.0040b3c0
push ebx
call fcn.0040b324
add esp, 0x10
mov ecx, 0xffffc30b
push 0x15f90
mov word [0x424354], cx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, 1
fld dword [0x423c60]
mov edx, dword [esp + 0x34]
mov dword [esp + 0x1c], edx
fild dword [esp + 0x1c]
mov edi, dword [esp + 0x44]
fadd qword [esp + 0x54]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x1c], eax
fild dword [esp + 0x1c]
fsubp st(1)
fsubp st(1)
fstp dword [0x423c60]
add dword [esp + 0x24], esi
fld qword [esp + 0x54]
mov esi, dword [esp + 0x48]
fsub qword [0x41f340]
fstp qword [esp + 0x54]
push 0x3e8
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [0x4276e0]
push ebx
push ecx
call fcn.00402130
add esp, 8
test eax, eax
jne 0x409040
mov edx, dword [0x4276e8]
mov eax, dword [0x427224]
push edx
push eax
call fcn.004010c0
jmp 0x40903a