Function at 0x402260
Capabilities:
Get common file path
Read file on windows
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x437c3b
mov eax, dword fs:[0]
push eax
sub esp, 0x244
mov eax, dword [0x4483d0]
xor eax, esp
mov dword [esp + 0x240], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4483d0]
xor eax, esp
push eax
lea eax, [esp + 0x258]
mov dword fs:[0], eax
push 0x103
lea eax, [esp + 0x154]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x4c]
push ecx
push 0x103
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [esp + 0x4c]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4022c7
sub eax, edx
cmp byte [esp + eax + 0x4b], 0x5c
je 0x4022f4
lea edi, [esp + 0x4c]
add edi, 0xffffffff
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x4022e0
mov dx, word [0x43ea74]
mov word [edi], dx
lea eax, [esp + 0x150]
push 0x43ea1c
push eax
call fcn.00421768
mov esi, eax
add esp, 8
test esi, esi
je 0x402593
push 2
push 0xffffffffffffffd8
push esi
call fcn.0042217a
push esi
xor eax, eax
push 8
lea ecx, [esp + 0x40]
push 1
push ecx
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
call fcn.00421c3a
lea edx, [esp + 0x48]
push edx
call fcn.004211b1
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
add esp, 0x20
test eax, eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], eax
jle 0x402529
shl eax, 5
mov ecx, eax
mov eax, 0xffffffd8
sub eax, ecx
mov dword [esp + 0x1c], eax
jmp 0x402386
mov eax, dword [esp + 0x1c]
push 2
push eax
push esi
call fcn.0042217a
push esi
xor eax, eax
push 9
lea edx, [esp + 0x40]
push 1
push edx
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
call fcn.00421c3a
lea eax, [esp + 0x48]
push eax
call fcn.004211b1
push esi
push 0x17
mov ebp, eax
xor eax, eax
lea ecx, [esp + 0x54]
push 1
push ecx
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
call fcn.00421c3a
add esp, 0x30
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x18]
call fcn.00401270
lea ebx, [esp + 0x14]
mov dword [esp + 0x260], 0
call fcn.00402e60
mov edi, eax
call fcn.00402ee0
mov eax, dword [esp + 0x18]
push 0
push eax
push esi
call fcn.0042217a
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x34]
push edx
mov ecx, ebx
call fcn.00402d20
mov eax, dword [eax]
push eax
call fcn.004018a0
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
add esp, 0x18
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40246a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x1c]
call fcn.00402d20
mov eax, dword [eax]
push 0x43ea88
push eax
call fcn.00421768
mov ebx, eax
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
add esp, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4024af
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test ebx, ebx
je 0x40255f
push ebp
call fcn.00405905
push esi
push ebp
mov edi, eax
push 1
push edi
call fcn.00421c3a
push ebx
push ebp
push 1
push edi
call fcn.00421dea
push ebx
call fcn.00422323
push edi
call fcn.00405900
add dword [esp + 0x44], ebp
mov dword [esp + 0x28c], 0xffffffff
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
add esp, 0x2c
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402511
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
add dword [esp + 0x1c], 0x20
sub eax, 1
test eax, eax
mov dword [esp + 0x20], eax
jg 0x402382
push esi
call fcn.00422323
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x258]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x240]
xor ecx, esp
call fcn.00420b57
add esp, 0x250
ret
push esi
call fcn.00422323
mov dword [esp + 0x264], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402593
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x402537