Function at 0x4089b0
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 0x41de28
mov eax, dword fs:[0]
push eax
sub esp, 0xe0
mov eax, dword [0x424f28]
xor eax, esp
mov dword [esp + 0xd8], eax
push ebx
push esi
push edi
mov eax, dword [0x424f28]
xor eax, esp
push eax
lea eax, [esp + 0xf0]
mov dword fs:[0], eax
fldz
xor eax, eax
fst qword [esp + 0x6c]
xor ecx, ecx
fldz
mov word [esp + 0x14], ax
mov word [esp + 0x30], cx
xor edx, edx
mov word [esp + 0x18], dx
fstp dword [esp + 0x10]
xor ebx, ebx
fst qword [esp + 0x54]
mov dword [esp + 0x3c], ebx
fstp qword [esp + 0x44]
mov word [esp + 0x14], ax
mov dword [esp + 0x38], ebx
mov word [esp + 0x20], cx
mov dx, word [esp + 0x30]
movsx eax, dx
sub eax, 0xf7e0a45
mov dword [0x422eec], eax
dec dword [esp + 0x30]
fld dword [0x4231b0]
mov dword [esp + 0xa0], 0xf
fmul qword [0x41e910]
mov dword [esp + 0x9c], ebx
mov byte [esp + 0x8c], cl
fstp dword [0x4231b0]
push 0x118
mov dword [esp + 0xfc], ebx
call fcn.0040aadb
push eax
mov dword [esp + 0x80], eax
call fcn.00403ce0
add esp, 8
nop
push 0
call fcn.0040a92a
add esp, 4
cmp edx, ebx
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], edx
jg 0x408abb
jl 0x408ab1
cmp eax, dword [esp + 0x3c]
jae 0x408abb
mov dword [esp + 0x3c], 0
xor ebx, ebx
add dword [0x423118], 0x44879115
mov ecx, eax
sub ecx, dword [esp + 0x3c]
mov esi, edx
sbb esi, ebx
mov dword [esp + 0x28], esi
js 0x40937d
jg 0x408ae7
cmp ecx, 0x708
jbe 0x40937d
fld qword [esp + 0x44]
mov ebx, edx
fsub qword [0x41e908]
mov esi, eax
mov dword [esp + 0x3c], eax
shr esi, 9
fstp qword [0x423078]
movzx ecx, word [esp + 0x14]
movsx edx, cx
mov dword [esp + 0x34], edx
push 0x408
lea edi, [esi + 0x55]
fild dword [esp + 0x38]
push 0x423f50
mov dword [esp + 0x48], ebx
mov dword [esp + 0x70], 0
fstp dword [0x422290]
inc dword [esp + 0x1c]
movzx eax, word [0x424bb0]
movzx ecx, word [esp + 0x1c]
cwde
lea edx, [ecx + eax + 0x7700a82c]
mov word [0x424bb0], dx
mov dword [esp + 0x58], esi
mov dword [esp + 0x2c], edi
call fcn.00402850
push 0xd
push 0x423d68
mov dword [esp + 0x84], eax
call fcn.00402850
push 0xaf1
push 0x423200
mov dword [esp + 0x78], eax
call fcn.00402850
push 0x31e
push 0x424360
mov dword [esp + 0x54], eax
call fcn.00402850
mov dword [esp + 0x84], eax
movzx eax, word [esp + 0x34]
movzx edx, word [esp + 0x34]
mov ecx, 0x85373f20
sub ecx, eax
imul ecx, edx
add esp, 0x20
mov word [esp + 0x14], cx
cmp esi, edi
je 0x409086
mov eax, dword [0x426740]
push 0
push eax
call fcn.004011c0
add esp, 8
test eax, eax
jne 0x408beb
mov ecx, dword [0x426748]
mov edx, dword [0x426284]
push ecx
push edx
call fcn.004023d0
add esp, 8
mov eax, dword [esp + 0x50]
fld qword [0x4230c0]
mov ecx, dword [esp + 0x64]
fmul qword [0x41e900]
mov edx, dword [esp + 0x34]
push eax
push ecx
fstp qword [0x4230c0]
push edx
lea eax, [esp + 0xb0]
push eax
call fcn.00403ee0
push 0x8b
push 0x422ef8
call fcn.00402850
fld qword [esp + 0x5c]
fadd qword [esp + 0x84]
mov ebx, eax
mov eax, dword [esp + 0x78]
add esp, 0x18
fstp qword [esp + 0x6c]
mov esi, eax
fld qword [esp + 0x44]
fsub qword [0x41e350]
fstp qword [esp + 0x44]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408c50
mov edi, ebx
sub eax, esi
dec edi
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408c60
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 0x2710
rep movsb byte es:[edi], byte [esi]
push 0
lea ecx, [esp + 0x90]
push ecx
lea edx, [esp + 0xb0]
push ebx
push edx
call fcn.004081d0
push ebx
push 0x8b
call fcn.004017a0
fld qword [esp + 0x60]
mov eax, dword [esp + 0xa8]
fmul qword [0x41e8f8]
add esp, 0x1c
cmp dword [esp + 0xa0], 0x10
fstp qword [esp + 0x44]
jae 0x408cc7
lea eax, [esp + 0x8c]
mov ecx, dword [esp + 0x9c]
mov edx, dword [esp + 0x74]
push ecx
push eax
push edx
call fcn.00407c10
add esp, 0xc
cmp eax, 9
jl 0x409038
inc word [0x422278]
fld dword [esp + 0x10]
mov cx, word [0x422278]
movsx edx, cx
mov ecx, 0x5146a711
sub ecx, edx
cmp dword [esp + 0xa0], 0x10
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x8c]
fisub dword [esp + 0x10]
fstp dword [esp + 0x10]
jae 0x408d26
lea ecx, [esp + 0x8c]
mov edx, dword [ecx]
xor ecx, ecx
cmp ecx, dword [esp + 0x80]
jl 0x409038
jg 0x408d43
cmp edx, dword [esp + 0x7c]
jb 0x409038
lea esi, [eax - 1]
cmp esi, dword [esp + 0x9c]
jbe 0x408d54
call fcn.0040b6d9
mov eax, dword [esp + 0x8c]
mov ecx, 0x10
cmp dword [esp + 0xa0], ecx
jae 0x408d70
lea eax, [esp + 0x8c]
mov byte [eax + esi], 0
mov eax, dword [esp + 0x8c]
cmp dword [esp + 0xa0], ecx
jae 0x408d8b
lea eax, [esp + 0x8c]
lea ecx, [esp + 0xa4]
add eax, 8
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x408db5
test dl, dl
je 0x408db1
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x408db5
add eax, 2
add ecx, 2
test dl, dl
jne 0x408d95
xor eax, eax
jmp 0x408dba
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x409038
mov edx, dword [esp + 0xa0]
mov ecx, dword [esp + 0x8c]
cmp edx, 0x10
jb 0x408ead
mov edi, ecx
test ecx, ecx
je 0x408e0c
mov eax, ecx
cmp edx, 0x10
jae 0x408ded
lea eax, [esp + 0x8c]
cmp eax, edi
ja 0x408e0c
mov eax, ecx
cmp edx, 0x10
jae 0x408dff
lea eax, [esp + 0x8c]
mov ecx, dword [esp + 0x9c]
add eax, ecx
cmp edi, eax
jbe 0x408e18
call fcn.0040b6d9
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 0x408e3b
lea eax, [esp + 0x8c]
lea edi, [eax + ecx]
test edi, edi
je 0x408e72
mov eax, dword [esp + 0x8c]
cmp edx, 0x10
jae 0x408e55
lea eax, [esp + 0x8c]
cmp eax, edi
ja 0x408e72
mov eax, dword [esp + 0x8c]
cmp edx, 0x10
jae 0x408e6c
lea eax, [esp + 0x8c]
add eax, ecx
cmp edi, eax
jbe 0x408e77
call fcn.0040b6d9
cmp esi, 0xfffffffc
je 0x408e90
test esi, esi
je 0x408e8b
lea edx, [esp + 0x88]
cmp esi, edx
je 0x408e90
call fcn.0040b6d9
cmp ebx, edi
je 0x408f13
cmp esi, 0xfffffffc
je 0x408eca
test esi, esi
jne 0x408ea2
call fcn.0040b6d9
cmp dword [esi + 0x18], 0x10
jb 0x408eb9
mov eax, dword [esi + 4]
jmp 0x408ebc
lea edi, [esp + 0x8c]
jmp 0x408ddf
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp ebx, ecx
jb 0x408eca
call fcn.0040b6d9
mov byte [ebx], 0
cmp esi, 0xfffffffc
je 0x408ef7
test esi, esi
jne 0x408edb
call fcn.0040b6d9
cmp dword [esi + 0x18], 0x10
jb 0x408ee6
mov eax, dword [esi + 4]
jmp 0x408ee9
lea eax, [esi + 4]
mov edx, dword [esi + 0x14]
add edx, eax
cmp ebx, edx
jb 0x408ef7
call fcn.0040b6d9
movzx eax, word [esp + 0x14]
mov ecx, dword [esp + 0x9c]
inc ebx
add eax, 0xb21e0c3
mov word [esp + 0x14], ax
jmp 0x408e21
push 0x7e
push 0x422ef8
call fcn.00402850
push 0
push 0
lea ecx, [esp + 0x98]
push ecx
mov esi, eax
lea edx, [esp + 0xb8]
push esi
push edx
call fcn.004081d0
push esi
push 0x7e
call fcn.004017a0
mov ax, word [esp + 0x3c]
movsx ecx, ax
add ecx, 0x5af0843e
mov dword [esp + 0x40], ecx
or edi, 0xffffffff
add esp, 0x24
fild dword [esp + 0x1c]
fld qword [esp + 0x44]
add dword [esp + 0x18], edi
fsubr qword [0x41e8f0]
fcompp
fnstsw ax
test ah, 0x41
jne 0x408f86
fld dword [esp + 0x10]
fsub qword [0x41e8e8]
fstp dword [esp + 0x10]
jmp 0x408ff1
inc dword [esp + 0x18]
mov edx, dword [0x422324]
mov dword [esp + 0x1c], edx
fild dword [esp + 0x1c]
fadd dword [esp + 0x10]
mov ax, word [esp + 0x18]
add dword [0x422324], edi
movsx ecx, ax
mov dword [esp + 0x1c], ecx
fild dword [esp + 0x1c]
fucompp
fnstsw ax
fld dword [esp + 0x10]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [esp + 0x10]
test ah, 0x44
jp 0x408fef
fadd qword [esp + 0x6c]
fstp qword [esp + 0x6c]
mov edx, dword [0x422fcc]
mov dword [esp + 0x1c], edx
fild dword [esp + 0x1c]
fadd qword [esp + 0x6c]
fstp qword [esp + 0x54]
add dword [0x422fcc], edi
jmp 0x408ff1
fstp st(0)
push 0xc
push 0x422144
call fcn.00402850
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409005
sub eax, edx
push eax
push edi
push esi
lea ecx, [esp + 0x94]
call fcn.00404b80
push esi
push 0xc
mov edi, eax
call fcn.004017a0
mov eax, dword [esp + 0xa4]
add eax, 0xfffffff5
add esp, 8
cmp edi, eax
je 0x40904d
mov eax, dword [esp + 0x50]
inc eax
mov dword [esp + 0x50], eax
cmp eax, dword [esp + 0x24]
jne 0x408bc1
jmp 0x409082
push 0xb
push edi
lea ecx, [esp + 0x90]
call fcn.00405130
mov cx, word [esp + 0x30]
movsx edx, cx
mov dword [esp + 0x24], edx
fild dword [esp + 0x24]
fadd dword [esp + 0x10]
call fcn.0040abc0
mov word [esp + 0x30], ax
mov dword [esp + 0x68], 1
mov ebx, dword [esp + 0x40]
mov eax, dword [esp + 0x74]
push eax
push 0x408
call fcn.004017a0
mov ecx, dword [esp + 0x68]
push ecx
push 0xd
call fcn.004017a0
movzx edx, word [esp + 0x28]
mov eax, dword [esp + 0x74]
push eax
sub edx, 0x5ba57f8a
push 0x31e
mov word [esp + 0x30], dx
call fcn.004017a0
mov ecx, dword [esp + 0x4c]
push ecx
push 0xaf1
call fcn.004017a0
push 0x40
lea edx, [esp + 0xc8]
push 0
push edx
call fcn.0040afe0
add esp, 0x2c
cmp dword [esp + 0x68], 0
je 0x40937d
mov eax, dword [esp + 0x78]
push 0x708
push eax
call fcn.00403580
add esp, 8
cmp dword [esp + 0x9c], 0x200
jbe 0x40937d
fld dword [0x423ea0]
fsub qword [0x41e8e0]
fcomp qword [0x41e8d8]
fnstsw ax
test ah, 5
jp 0x409140
mov cx, word [esp + 0x20]
movsx edx, cx
sub edx, 0x5976770f
mov dword [esp + 0x38], edx
dec dword [esp + 0x20]
push 0x370
call fcn.0040aadb
mov esi, eax
movzx eax, word [esp + 0x24]
imul eax, eax, 0x313b78e6
mov word [esp + 0x24], ax
add esp, 4
fld qword [esp + 0x54]
push esi
fsub qword [0x41e8d0]
push 0xeb
fstp qword [esp + 0x5c]
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push esi
call fcn.00402a50
push 3
push 0x4230f8
call fcn.00402850
mov edi, eax
push edi
push esi
call fcn.0040b565
dec dword [esp + 0x2c]
fld dword [esp + 0x28]
mov cx, word [esp + 0x2c]
movsx edx, cx
add edx, 0x69901667
mov dword [esp + 0x3c], edx
push edi
push 3
fild dword [esp + 0x44]
mov ebx, eax
fsub qword [0x423f28]
fsubp st(1)
fstp dword [esp + 0x30]
call fcn.004017a0
add dword [0x423d20], 0x583dba43
mov eax, dword [esp + 0xac]
add esp, 0x20
cmp dword [esp + 0xa0], 0x10
jae 0x4091f4
lea eax, [esp + 0x8c]
mov ecx, dword [esp + 0x9c]
push ebx
push 1
push ecx
push eax
call fcn.0040b917
push ebx
call fcn.0040b10b
add esp, 0x14
push 0x104
lea eax, [esi + 0x104]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x15
push 0x424ddc
call fcn.00402850
fld dword [esp + 0x18]
fadd qword [esp + 0x5c]
push 0x20
push 0x4221ec
mov edi, eax
fstp dword [esp + 0x20]
call fcn.00402850
mov edx, dword [0x426740]
push edx
mov ebx, eax
push ebx
lea eax, [esi + 0x104]
push eax
push edi
lea eax, [esi + 0x208]
push 0x168
push eax
call fcn.0040b999
push ebx
push 0x20
call fcn.004017a0
fld qword [0x424ba0]
fsub qword [0x41e350]
fstp qword [0x424ba0]
fld qword [0x424ba0]
fadd qword [0x41e8c8]
call fcn.0040abc0
push edi
mov word [esp + 0x4c], ax
push 0x15
call fcn.004017a0
mov eax, dword [0x426740]
push 1
push eax
call fcn.004011c0
mov ecx, dword [0x4221c4]
mov edx, dword [esp + 0x78]
inc dword [esp + 0x78]
add esp, 0x40
cmp edx, ecx
jge 0x409311
fld qword [esp + 0x54]
mov ax, word [0x423f48]
mov dx, word [0x422fe8]
movsx ecx, ax
mov dword [esp + 0x24], ecx
movsx eax, dx
fild dword [esp + 0x24]
mov dword [esp + 0x24], eax
fsubp st(1)
fadd qword [0x41e8c0]
fild dword [esp + 0x24]
fmulp st(1)
call fcn.0040abc0
mov word [0x422fe8], ax
fld qword [esp + 0x54]
fadd qword [0x41e350]
fstp qword [esp + 0x54]
jmp 0x40934b
fld qword [0x423d48]
mov cx, word [0x423098]
fsub qword [0x41e8b8]
inc word [0x423098]
movsx edx, cx
mov dword [esp + 0x24], edx
fild dword [esp + 0x24]
fsubp st(1)
fcomp qword [0x41e8b0]
fnstsw ax
test ah, 0x44
jnp 0x40934b
fld qword [esp + 0x44]
fstp st(0)
lea eax, [esi + 0x208]
push eax
push esi
call fcn.004023d0
push 0x370
push 0
push esi
call fcn.0040afe0
push esi
call fcn.0040a9fe
add esp, 0x18
push 0x15f90
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ebx, dword [esp + 0x40]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
movzx eax, word [esp + 0x20]
movzx ecx, word [esp + 0x18]
lea edx, [eax + ecx - 0x17f51ebe]
mov eax, dword [0x426740]
push 0
push eax
mov word [esp + 0x20], dx
call fcn.004011c0
add esp, 8
test eax, eax
jne 0x408a90
mov ecx, dword [0x426748]
mov edx, dword [0x426284]
push ecx
push edx
call fcn.004023d0
jmp 0x408a8c