Function at 0x4091a0
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 0x41e9f8
mov eax, dword fs:[0]
push eax
sub esp, 0xd0
mov eax, dword [0x426070]
xor eax, esp
mov dword [esp + 0xc8], eax
push ebx
push esi
push edi
mov eax, dword [0x426070]
xor eax, esp
push eax
lea eax, [esp + 0xe0]
mov dword fs:[0], eax
fldz
xor eax, eax
mov word [esp + 0x24], ax
xor ecx, ecx
mov word [esp + 0x50], cx
xor edx, edx
mov word [esp + 0x28], dx
fst dword [esp + 0x2c]
fldz
mov word [esp + 0x20], ax
mov dword [esp + 0x74], eax
mov dword [esp + 0x30], eax
fstp qword [esp + 0x34]
mov dword [esp + 0x44], eax
fstp dword [esp + 0x20]
mov word [esp + 0x40], cx
mov dword [esp + 0x48], eax
mov dword [esp + 0x90], 0xf
mov dword [esp + 0x8c], eax
mov byte [esp + 0x7c], al
push 0x118
mov dword [esp + 0xec], eax
call fcn.0040b7a8
push eax
mov dword [esp + 0x70], eax
call fcn.004031c0
add esp, 8
push 0
call fcn.0040b50a
mov esi, dword [esp + 0x4c]
add esp, 4
cmp edx, esi
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], edx
jg 0x409283
jl 0x409275
cmp eax, dword [esp + 0x44]
jae 0x409283
xor esi, esi
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], esi
mov ecx, eax
sub ecx, dword [esp + 0x44]
mov edi, edx
sbb edi, esi
mov dword [esp + 0x18], edi
js 0x409d64
jg 0x4092a5
cmp ecx, 0x708
jbe 0x409d64
fld dword [esp + 0x20]
mov dword [esp + 0x48], edx
fadd qword [0x41f348]
mov edi, eax
mov dword [esp + 0x44], eax
shr edi, 9
fstp dword [esp + 0x20]
mov dword [esp + 0x64], 0
fld qword [0x4241f0]
fld dword [esp + 0x20]
mov dword [esp + 0x20], edi
fsubr qword [0x41f928]
fsubp st(1)
fstp qword [0x4241f0]
mov dx, word [esp + 0x50]
movsx eax, dx
add eax, 0x75170f0
cmp eax, 0xf2727b19
jge 0x40930c
movzx ecx, word [0x4250b4]
imul ecx, ecx, 0x5dd50520
mov word [0x4250b4], cx
push 0x408
lea ebx, [edi + 0x55]
push 0x425528
mov dword [esp + 0x1c], ebx
call fcn.00402470
push 0xd
push 0x4253b8
mov dword [esp + 0x70], eax
call fcn.00402470
mov esi, eax
push 0xaf1
push 0x424378
mov dword [esp + 0x6c], esi
call fcn.00402470
push 0x31e
push 0x423e40
mov dword [esp + 0x78], eax
call fcn.00402470
add esp, 0x20
mov dword [esp + 0x5c], eax
cmp edi, ebx
je 0x4098ea
lea esp, [esp]
mov edx, dword [0x427880]
push 0
push edx
call fcn.004015e0
add esp, 8
test eax, eax
jne 0x40939a
mov eax, dword [0x427888]
mov ecx, dword [0x4273c4]
push eax
push ecx
call fcn.00401aa0
add esp, 8
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x58]
push edx
push eax
push ecx
lea edx, [esp + 0xa0]
push edx
call fcn.00402d90
mov ax, word [0x425324]
mov dx, word [esp + 0x34]
movsx ecx, ax
movsx eax, dx
add eax, dword [esp + 0x40]
mov dword [esp + 0x2c], ecx
fild dword [esp + 0x2c]
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
fsub qword [esp + 0x44]
fsubp st(1)
call fcn.0040b620
push 0x8b
push 0x424f10
mov word [0x425324], ax
call fcn.00402470
mov ebx, eax
mov eax, dword [esp + 0x6c]
add esp, 0x18
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409406
mov edi, ebx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x409412
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 + 0x80]
push ecx
lea edx, [esp + 0xa0]
push ebx
push edx
call fcn.004085e0
push 0x8b
fldz
push 0
mov dword [esp + 0x38], 0
fstp dword [esp + 0x2c]
push ebx
call fcn.0040b890
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x3c], eax
fild dword [esp + 0x3c]
fadd dword [0x423104]
fadd dword [esp + 0x30]
mov ecx, dword [0x425980]
mov dword [esp + 0x30], ecx
fild dword [esp + 0x30]
fmulp st(1)
call fcn.0040b620
push ebx
mov dword [0x425980], eax
call fcn.0040b6cb
mov eax, dword [esp + 0xa0]
add esp, 0x24
cmp dword [esp + 0x90], 0x10
jae 0x4094ae
lea eax, [esp + 0x7c]
mov edx, dword [esp + 0x8c]
push edx
push eax
mov eax, dword [esp + 0x68]
push eax
call fcn.00408f10
mov ecx, dword [0x42422c]
add ecx, 0x7e705c82
mov dword [esp + 0x1c], ecx
fild dword [esp + 0x1c]
mov esi, eax
add esp, 0xc
cmp esi, 9
fmul qword [0x425038]
fstp qword [0x425038]
jl 0x409896
mov dx, word [0x423114]
movsx eax, dx
mov ecx, 0x36f9afa6
sub ecx, eax
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
fld qword [esp + 0x34]
fucompp
fnstsw ax
test ah, 0x44
jnp 0x40953a
dec word [0x424f00]
mov dx, word [0x424f00]
movzx ecx, word [esp + 0x28]
movsx eax, dx
sub ecx, eax
add ecx, 0x351618af
mov word [esp + 0x28], cx
jmp 0x409571
fld qword [esp + 0x34]
mov dx, word [0x423050]
fadd qword [0x41f920]
movsx eax, dx
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fmulp st(1)
call fcn.0040b620
mov word [0x423050], ax
fld qword [esp + 0x34]
fadd qword [0x41f348]
fstp qword [esp + 0x34]
mov eax, dword [esp + 0x7c]
mov edi, 0x10
cmp dword [esp + 0x90], edi
jae 0x409587
lea eax, [esp + 0x7c]
mov ecx, dword [eax]
xor eax, eax
cmp eax, dword [esp + 0x70]
jg 0x4095c0
jl 0x409599
cmp ecx, dword [esp + 0x6c]
jae 0x4095c0
mov cx, word [esp + 0x40]
movsx edx, cx
sub edx, 0x1f12fca
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fmul dword [0x425304]
fstp dword [0x425304]
jmp 0x409896
dec esi
cmp esi, dword [esp + 0x8c]
jbe 0x4095cf
call fcn.0040c369
mov eax, dword [esp + 0x7c]
cmp dword [esp + 0x90], edi
jae 0x4095e0
lea eax, [esp + 0x7c]
mov byte [eax + esi], 0
mov esi, dword [esp + 0x90]
mov ebx, dword [esp + 0x7c]
mov eax, ebx
cmp esi, edi
jae 0x4095f9
lea eax, [esp + 0x7c]
lea ecx, [esp + 0x94]
add eax, 8
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x409623
test dl, dl
je 0x40961f
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x409623
add eax, 2
add ecx, 2
test dl, dl
jne 0x409603
xor eax, eax
jmp 0x409628
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x409675
mov ax, word [0x4241f8]
movsx ecx, ax
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
fadd dword [esp + 0x2c]
mov edx, dword [0x425f2c]
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fmulp st(1)
call fcn.0040b620
mov dword [0x425f2c], eax
inc word [0x4241f8]
fld dword [esp + 0x2c]
fsub qword [0x41f348]
fstp dword [esp + 0x2c]
jmp 0x409896
cmp esi, edi
jb 0x409741
mov edi, ebx
test ebx, ebx
je 0x4096aa
mov eax, ebx
cmp esi, 0x10
jae 0x40968e
lea eax, [esp + 0x7c]
cmp eax, edi
ja 0x4096aa
mov eax, ebx
cmp esi, 0x10
jae 0x40969d
lea eax, [esp + 0x7c]
mov ecx, dword [esp + 0x8c]
add eax, ecx
cmp edi, eax
jbe 0x4096b6
call fcn.0040c369
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 0x4096d0
lea eax, [esp + 0x7c]
lea edi, [eax + ecx]
test edi, edi
je 0x4096fb
mov eax, dword [esp + 0x7c]
cmp edx, 0x10
jae 0x4096e4
lea eax, [esp + 0x7c]
cmp eax, edi
ja 0x4096fb
mov eax, dword [esp + 0x7c]
cmp edx, 0x10
jae 0x4096f5
lea eax, [esp + 0x7c]
add eax, ecx
cmp edi, eax
jbe 0x409700
call fcn.0040c369
cmp esi, 0xfffffffc
je 0x409716
test esi, esi
je 0x409711
lea eax, [esp + 0x78]
cmp esi, eax
je 0x409716
call fcn.0040c369
cmp ebx, edi
je 0x409795
fld dword [esp + 0x2c]
fsub qword [0x41f918]
fstp dword [esp + 0x2c]
cmp esi, 0xfffffffc
je 0x40975b
test esi, esi
jne 0x409736
call fcn.0040c369
cmp dword [esi + 0x18], 0x10
jb 0x40974a
mov eax, dword [esi + 4]
jmp 0x40974d
lea edi, [esp + 0x7c]
jmp 0x409683
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp ebx, ecx
jb 0x40975b
call fcn.0040c369
mov byte [ebx], 0
cmp esi, 0xfffffffc
je 0x409788
test esi, esi
jne 0x40976c
call fcn.0040c369
cmp dword [esi + 0x18], 0x10
jb 0x409777
mov eax, dword [esi + 4]
jmp 0x40977a
lea eax, [esi + 4]
mov edx, dword [esi + 0x14]
add edx, eax
cmp ebx, edx
jb 0x409788
call fcn.0040c369
mov ecx, dword [esp + 0x8c]
inc ebx
jmp 0x4096bc
push 0x7e
push 0x424f10
call fcn.00402470
xor ebx, ebx
push ebx
mov esi, eax
push ebx
lea eax, [esp + 0x88]
push eax
lea ecx, [esp + 0xa8]
push esi
push ecx
call fcn.004085e0
fldz
push 0x7e
push ebx
mov dword [esp + 0x34], ebx
fstp dword [esp + 0x40]
push esi
call fcn.0040b890
mov edx, dword [esp + 0x38]
mov dword [esp + 0x38], edx
fild dword [esp + 0x38]
fadd dword [0x423104]
fadd dword [esp + 0x44]
mov eax, dword [0x425980]
mov dword [esp + 0x38], eax
fild dword [esp + 0x38]
fmulp st(1)
call fcn.0040b620
push esi
mov dword [0x425980], eax
call fcn.0040b6cb
push 0xc
push 0x4252e0
call fcn.00402470
add esp, 0x34
mov esi, eax
lea ecx, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x409820
sub eax, ecx
push eax
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0x84]
call fcn.00404560
fldz
mov dword [esp + 0x10], ebx
fstp dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
mov edi, eax
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
fadd dword [0x423104]
fadd dword [esp + 0x1c]
mov edx, dword [0x425980]
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fmulp st(1)
call fcn.0040b620
push esi
mov dword [0x425980], eax
call fcn.0040b6cb
mov eax, dword [esp + 0x90]
add eax, 0xfffffff5
add esp, 4
cmp edi, eax
je 0x4098ab
mov eax, dword [esp + 0x20]
inc eax
mov dword [esp + 0x20], eax
cmp eax, dword [esp + 0x14]
jne 0x409370
jmp 0x4098e6
push 0xb
push edi
lea ecx, [esp + 0x80]
call fcn.00405030
mov ecx, dword [0x423110]
mov dword [esp + 0x14], ecx
fild dword [esp + 0x14]
mov dword [esp + 0x64], 1
fstp dword [esp + 0x14]
fld dword [esp + 0x2c]
fadd dword [esp + 0x14]
call fcn.0040b620
mov dword [0x423110], eax
mov esi, dword [esp + 0x54]
fldz
mov ebx, dword [esp + 0x60]
xor edi, edi
push 0x408
push edi
mov dword [esp + 0x1c], edi
fstp dword [esp + 0x18]
push ebx
call fcn.0040b890
mov edx, dword [esp + 0x20]
mov dword [esp + 0x20], edx
fild dword [esp + 0x20]
fadd dword [0x423104]
fadd dword [esp + 0x1c]
mov eax, dword [0x425980]
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
fmulp st(1)
call fcn.0040b620
mov dword [0x425980], eax
push ebx
call fcn.0040b6cb
fldz
mov dword [esp + 0x24], edi
fstp dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
xor eax, eax
mov dword [esi], eax
mov dword [esp + 0x24], ecx
fild dword [esp + 0x24]
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov byte [esi + 0xc], al
fadd dword [0x423104]
fadd dword [esp + 0x20]
mov edx, dword [0x425980]
mov dword [esp + 0x24], edx
fild dword [esp + 0x24]
fmulp st(1)
call fcn.0040b620
mov dword [0x425980], eax
push esi
call fcn.0040b6cb
mov ax, word [0x425354]
mov ecx, dword [0x423168]
mov esi, dword [esp + 0x70]
cwde
add ecx, eax
mov dword [esp + 0x28], ecx
push 0x31e
push edi
fild dword [esp + 0x30]
push esi
fstp dword [esp + 0x40]
mov dword [esp + 0x34], edi
fldz
fstp dword [esp + 0x30]
call fcn.0040b890
mov edx, dword [esp + 0x34]
mov dword [esp + 0x34], edx
fild dword [esp + 0x34]
fadd dword [0x423104]
fadd dword [esp + 0x30]
mov eax, dword [0x425980]
mov dword [esp + 0x34], eax
fild dword [esp + 0x34]
fmulp st(1)
call fcn.0040b620
mov dword [0x425980], eax
push esi
call fcn.0040b6cb
fldz
mov esi, dword [esp + 0x7c]
push 0xaf1
push edi
mov dword [esp + 0x40], edi
fstp dword [esp + 0x3c]
push esi
call fcn.0040b890
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x44], ecx
fild dword [esp + 0x44]
fadd dword [0x423104]
fadd dword [esp + 0x40]
mov edx, dword [0x425980]
mov dword [esp + 0x44], edx
fild dword [esp + 0x44]
fmulp st(1)
call fcn.0040b620
mov dword [0x425980], eax
push esi
call fcn.0040b6cb
fld qword [esp + 0x68]
fld1
add esp, 0x34
fsub st(1), st(0)
fxch st(1)
fstp qword [esp + 0x34]
fld qword [esp + 0x34]
fcomp qword [0x41f910]
fnstsw ax
test ah, 1
jne 0x409ab9
mov ax, word [0x423050]
movsx ecx, ax
mov dword [esp + 0x14], ecx
fild dword [esp + 0x14]
fld qword [esp + 0x34]
fsub qword [0x41f908]
fcompp
fnstsw ax
fsubr qword [esp + 0x34]
fstp qword [esp + 0x34]
test ah, 5
jp 0x409abb
inc dword [esp + 0x28]
mov dx, word [esp + 0x28]
mov cx, word [esp + 0x28]
movsx eax, dx
movsx edx, cx
sub eax, edx
sub eax, 0x6d07b11a
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fstp dword [esp + 0x20]
jmp 0x409abb
fstp st(0)
push 0x40
lea eax, [esp + 0x98]
push edi
push eax
call fcn.0040b890
add esp, 0xc
cmp dword [esp + 0x64], edi
je 0x409d64
mov ecx, dword [esp + 0x68]
push 0x708
push ecx
call fcn.004034c0
add esp, 8
cmp dword [esp + 0x8c], 0x200
jbe 0x409d55
push 0x370
call fcn.0040b7a8
movzx edx, word [esp + 0x44]
mov ebx, eax
movzx eax, word [0x425984]
sub edx, 0x22db0236
imul edx, eax
add esp, 4
push ebx
mov word [0x425984], dx
inc dword [esp + 0x44]
push 0xeb
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push ebx
call fcn.004033e0
push 3
push 0x425044
call fcn.00402470
movzx ecx, word [esp + 0x34]
mov esi, eax
add ecx, 0x2124e2d9
push esi
mov word [esp + 0x38], cx
push ebx
call fcn.0040c146
mov edi, eax
fldz
xor eax, eax
mov dword [esp + 0x2c], eax
fstp dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x2c], edx
mov word [esi], ax
fild dword [esp + 0x2c]
mov byte [esi + 2], al
fadd dword [0x423104]
fadd dword [esp + 0x28]
mov eax, dword [0x425980]
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
fmulp st(1)
call fcn.0040b620
push esi
mov dword [0x425980], eax
call fcn.0040b6cb
mov eax, dword [esp + 0x98]
add esp, 0x1c
cmp dword [esp + 0x90], 0x10
jae 0x409bc9
lea eax, [esp + 0x7c]
mov ecx, dword [esp + 0x8c]
push edi
push 1
push ecx
push eax
call fcn.0040c5a7
push edi
call fcn.0040bcec
add esp, 0x14
push 0x104
lea eax, [ebx + 0x104]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x15
push 0x424f90
call fcn.00402470
push 0x20
push 0x424ed8
mov edi, eax
call fcn.00402470
mov edx, dword [esp + 0x40]
mov esi, eax
imul edx, edx, 0x7bed636
mov eax, dword [0x427880]
push eax
push esi
lea eax, [ebx + 0x104]
push eax
push edi
lea eax, [ebx + 0x208]
push 0x168
mov dword [esp + 0x54], edx
push eax
call fcn.0040c15d
xor eax, eax
fldz
mov dword [esi], eax
mov dword [esp + 0x3c], eax
fstp dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
mov dword [esp + 0x3c], ecx
mov dword [esi + 0x14], eax
fild dword [esp + 0x3c]
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
fadd dword [0x423104]
fadd dword [esp + 0x38]
mov edx, dword [0x425980]
mov dword [esp + 0x3c], edx
fild dword [esp + 0x3c]
fmulp st(1)
call fcn.0040b620
mov dword [0x425980], eax
push esi
call fcn.0040b6cb
fldz
xor eax, eax
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
mov dword [esp + 0x40], 0
fstp dword [esp + 0x3c]
mov dword [edi + 0x10], eax
mov byte [edi + 0x14], al
mov eax, dword [esp + 0x40]
mov dword [esp + 0x40], eax
fild dword [esp + 0x40]
fadd dword [0x423104]
fadd dword [esp + 0x3c]
mov ecx, dword [0x425980]
mov dword [esp + 0x40], ecx
fild dword [esp + 0x40]
fmulp st(1)
call fcn.0040b620
mov dword [0x425980], eax
push edi
call fcn.0040b6cb
mov edx, dword [0x427880]
push 1
push edx
call fcn.004015e0
lea eax, [ebx + 0x208]
push eax
push ebx
call fcn.00401aa0
add esp, 0x40
push 0x370
push 0
push ebx
call fcn.0040b890
fld qword [0x424240]
mov eax, dword [0x423110]
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
push ebx
fsubp st(1)
fstp qword [0x424240]
call fcn.0040b6cb
add dword [0x42321c], 0xb033426f
add esp, 0x10
push 0x15f90
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x74]
imul ecx, edx
mov dword [esp + 0x30], ecx
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x427880]
push 0
push eax
call fcn.004015e0
add esp, 8
test eax, eax
jne 0x409253
mov ecx, dword [0x427888]
mov edx, dword [0x4273c4]
push ecx
push edx
call fcn.00401aa0
jmp 0x409250