Function at 0x403140
Capabilities:
Encode data using xor
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5445ed
mov eax, dword fs:[0]
push eax
sub esp, 0x428
mov eax, dword [0x5a61b0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x428], edi
call fcn.00418682
push dword [edi + 0x168]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push 1
push 0x80
push dword [edi + 0x20]
call esi
push dword [edi + 0x168]
push 0
push 0x80
push dword [edi + 0x20]
call esi
mov dword [0x5b16a8], 0x4082f0
mov dword [0x5b16a4], 0x4089b0
mov dword [0x5b16a0], 0x408890
call fcn.0041ab5b
push 0x208
lea ecx, [ebp - 0x420]
push ecx
mov eax, dword [eax + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x420]
mov esi, 0x587b70
push 0x5c
push eax
call fcn.0052aff2
add esp, 8
lea ecx, [eax + 2]
sub ecx, esi
lea esp, [esp]
movzx eax, word [esi]
lea esi, [esi + 2]
mov word [ecx + esi - 2], ax
test ax, ax
jne 0x403200
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocStringLen
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x434], esi
cmp esi, 0xffffffff
je 0x403820
push 0x800
call fcn.0040c061
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x403819
push 0
lea eax, [ebp - 0x430]
mov dword [ebp - 0x430], 0
push eax
push 0x800
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403810
cmp dword [ebp - 0x430], 0x800
jne 0x403810
mov eax, 2
lea ecx, [ebx + 0x40]
sub eax, ebx
mov esi, 1
mov dword [ebp - 0x424], eax
sub esi, ebx
mov edi, dword [ebp - 0x424]
mov eax, 3
sub eax, ebx
mov edx, 0x40
mov dword [ebp - 0x42c], eax
mov edi, edi
mov eax, edx
add edx, 4
and eax, 0x3f
movzx eax, byte [eax + ebx]
xor byte [ecx], al
lea eax, [esi + ecx]
and eax, 0x3f
movzx eax, byte [eax + ebx]
xor byte [ecx + 1], al
lea eax, [edi + ecx]
and eax, 0x3f
movzx eax, byte [eax + ebx]
xor byte [ecx + 2], al
mov eax, dword [ebp - 0x42c]
add eax, ecx
and eax, 0x3f
movzx eax, byte [eax + ebx]
xor byte [ecx + 3], al
add ecx, 4
cmp edx, 0x800
jl 0x4032c0
mov edi, dword [ebp - 0x428]
mov ecx, 1
mov eax, dword [edi + 0x98]
lea esi, [edi + 0x98]
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x5c
or eax, ecx
jge 0x403332
push 0x5c
mov ecx, esi
call fcn.00404fb0
mov ecx, dword [esi]
cmp dword [ecx - 8], 0x5c
jge 0x403344
push 0x80070057
call fcn.004052c0
mov dword [ecx - 0xc], 0x5c
xor edx, edx
mov eax, dword [esi]
mov word [eax + 0xb8], dx
lea edx, [ebx + 0x64]
call fcn.004057e0
mov eax, dword [esi]
test eax, eax
jne 0x403368
xor ecx, ecx
jmp 0x40337a
push dword [eax - 8]
push eax
call fcn.0052b098
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x40333a
mov eax, dword [esi]
cmp ecx, dword [eax - 8]
jg 0x40333a
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [esi]
mov word [eax + ecx*2], dx
mov ecx, 1
mov eax, dword [edi + 0x16c]
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x400
or eax, ecx
jge 0x4033b6
push 0x400
lea ecx, [edi + 0x16c]
call fcn.00404fb0
mov ecx, dword [edi + 0x16c]
cmp dword [ecx - 8], 0x400
jge 0x4033cf
push 0x80070057
call fcn.004052c0
mov dword [ecx - 0xc], 0x400
lea esi, [ebx + 0xc0]
mov eax, dword [edi + 0x16c]
xor edx, edx
mov word [eax + 0x800], dx
mov edx, esi
call fcn.004057e0
mov eax, dword [edi + 0x16c]
lea ecx, [edi + 0x16c]
test eax, eax
jne 0x403406
xor edx, edx
jmp 0x403422
push dword [eax - 8]
push eax
call fcn.0052b098
mov edx, eax
add esp, 8
test edx, edx
js 0x40333a
lea ecx, [edi + 0x16c]
mov eax, dword [ecx]
cmp edx, dword [eax - 8]
jg 0x40333a
mov dword [eax - 0xc], edx
xor edi, edi
mov eax, dword [ecx]
mov word [eax + edx*2], di
mov eax, dword [ecx]
cmp dword [eax - 0xc], edi
mov edi, dword [ebp - 0x428]
jl 0x40350c
push 0x587b90
push eax
call fcn.0052b6fa
add esp, 8
test eax, eax
je 0x40350c
sub eax, dword [edi + 0x16c]
lea ecx, [edi + 0x16c]
sar eax, 1
test eax, eax
jle 0x40350c
add eax, 8
push eax
lea eax, [ebp - 0x42c]
push eax
call fcn.00404570
lea ecx, [edi + 0x9c]
mov dword [ebp - 4], 0
push eax
call fcn.00404ae0
lea ecx, [ebp - 0x42c]
mov dword [ebp - 4], 0xffffffff
call fcn.00402eb0
mov eax, dword [edi + 0x9c]
cmp dword [eax - 0xc], 0
jl 0x40350c
push 0x587ba4
push eax
call fcn.0052b6fa
add esp, 8
test eax, eax
je 0x40350c
sub eax, dword [edi + 0x9c]
lea ecx, [edi + 0x9c]
sar eax, 1
test eax, eax
jle 0x40350c
push eax
lea eax, [ebp - 0x42c]
push eax
call fcn.004045a0
push eax
lea ecx, [edi + 0x9c]
mov dword [ebp - 4], 1
call fcn.00404ae0
lea ecx, [ebp - 0x42c]
mov dword [ebp - 4], 0xffffffff
call fcn.00402eb0
lea ecx, [esi + 1]
nop
mov al, byte [esi]
inc esi
test al, al
jne 0x403510
mov eax, dword [edi + 0xa0]
sub esi, ecx
mov ecx, 1
sub ecx, dword [eax - 4]
lea edx, [esi + 0xc1]
mov eax, dword [eax - 8]
sub eax, 0x5c
mov dword [ebp - 0x424], edx
or eax, ecx
jge 0x403550
push 0x5c
lea ecx, [edi + 0xa0]
call fcn.00404fb0
mov edx, dword [ebp - 0x424]
mov ecx, dword [edi + 0xa0]
cmp dword [ecx - 8], 0x5c
jge 0x403566
push 0x80070057
call fcn.004052c0
mov dword [ecx - 0xc], 0x5c
xor esi, esi
mov eax, dword [edi + 0xa0]
mov word [eax + 0xb8], si
lea esi, [edx + ebx]
mov edx, esi
call fcn.004057e0
mov eax, dword [edi + 0xa0]
test eax, eax
jne 0x403594
xor ecx, ecx
jmp 0x4035aa
push dword [eax - 8]
push eax
call fcn.0052b098
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x40333a
mov eax, dword [edi + 0xa0]
cmp ecx, dword [eax - 8]
jg 0x40333a
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [edi + 0xa0]
mov word [eax + ecx*2], dx
lea ecx, [esi + 1]
jmp 0x4035d0
mov al, byte [esi]
inc esi
test al, al
jne 0x4035d0
mov eax, dword [edi + 0x1174]
sub esi, ecx
mov edx, dword [ebp - 0x424]
mov ecx, 1
inc edx
add edx, esi
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
add eax, 0xffffff80
mov dword [ebp - 0x424], edx
or eax, ecx
jge 0x403616
push 0x80
lea ecx, [edi + 0x1174]
call fcn.00404fb0
mov edx, dword [ebp - 0x424]
mov ecx, dword [edi + 0x1174]
cmp dword [ecx - 8], 0x80
jge 0x40362f
push 0x80070057
call fcn.004052c0
mov dword [ecx - 0xc], 0x80
xor esi, esi
mov eax, dword [edi + 0x1174]
mov word [eax + 0x100], si
lea esi, [edx + ebx]
mov edx, esi
call fcn.004057e0
mov eax, dword [edi + 0x1174]
test eax, eax
jne 0x40365d
xor ecx, ecx
jmp 0x403673
push dword [eax - 8]
push eax
call fcn.0052b098
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x40333a
mov eax, dword [edi + 0x1174]
cmp ecx, dword [eax - 8]
jg 0x40333a
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [edi + 0x1174]
mov word [eax + ecx*2], dx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x403694
mov eax, dword [edi + 0x1178]
sub esi, ecx
mov edx, dword [ebp - 0x424]
mov ecx, 1
inc edx
add edx, esi
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
add eax, 0xffffff80
mov dword [ebp - 0x424], edx
or eax, ecx
jge 0x4036da
push 0x80
lea ecx, [edi + 0x1178]
call fcn.00404fb0
mov edx, dword [ebp - 0x424]
mov ecx, dword [edi + 0x1178]
cmp dword [ecx - 8], 0x80
jge 0x4036f3
push 0x80070057
call fcn.004052c0
mov dword [ecx - 0xc], 0x80
xor esi, esi
mov eax, dword [edi + 0x1178]
mov word [eax + 0x100], si
lea esi, [edx + ebx]
mov edx, esi
call fcn.004057e0
mov eax, dword [edi + 0x1178]
test eax, eax
jne 0x403721
xor ecx, ecx
jmp 0x403737
push dword [eax - 8]
push eax
call fcn.0052b098
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x40333a
mov eax, dword [edi + 0x1178]
cmp ecx, dword [eax - 8]
jg 0x40333a
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [edi + 0x1178]
mov word [eax + ecx*2], dx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x403758
mov edx, dword [ebp - 0x424]
sub esi, ecx
mov eax, dword [edi + 0x117c]
inc edx
add edx, esi
mov ecx, 1
lea esi, [edi + 0x117c]
mov dword [ebp - 0x42c], edx
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
add eax, 0xffffff80
or eax, ecx
jge 0x4037a0
push 0x80
mov ecx, esi
call fcn.00404fb0
mov edx, dword [ebp - 0x42c]
mov ecx, dword [esi]
cmp dword [ecx - 8], 0x80
jge 0x4037b5
push 0x80070057
call fcn.004052c0
mov dword [ecx - 0xc], 0x80
xor edi, edi
mov eax, dword [esi]
add edx, ebx
mov word [eax + 0x100], di
call fcn.004057e0
mov eax, dword [esi]
mov edi, dword [ebp - 0x428]
test eax, eax
jne 0x4037de
xor ecx, ecx
jmp 0x4037f4
push dword [eax - 8]
push eax
call fcn.0052b098
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x40333a
mov eax, dword [esi]
cmp ecx, dword [eax - 8]
jg 0x40333a
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [esi]
mov esi, dword [ebp - 0x434]
mov word [eax + ecx*2], dx
push ebx
call fcn.0040c05c
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [edi + 0x16c]
cmp dword [eax - 0xc], 0
je 0x4039ef
mov eax, dword [edi + 0x98]
lea ebx, [edi + 0x98]
cmp dword [eax - 0xc], 0
je 0x4039ef
mov eax, dword [edi + 0xa0]
cmp dword [eax - 0xc], 0
je 0x4039ef
push 0x587ce0
lea ecx, [ebp - 0x428]
call fcn.00405200
lea eax, [ebp - 0x428]
mov dword [ebp - 4], 2
push eax
mov ecx, edi
call fcn.0040e942
push 0x587ba8
lea eax, [ebp - 0x42c]
push ebx
push eax
call fcn.00404990
lea ecx, [ebp - 0x428]
mov byte [ebp - 4], 3
push ecx
push eax
lea eax, [ebp - 0x434]
push eax
call fcn.00404610
add esp, 0x18
push eax
lea ecx, [ebp - 0x428]
mov byte [ebp - 4], 4
call fcn.00404ae0
mov byte [ebp - 4], 3
or esi, 0xffffffff
mov edx, dword [ebp - 0x434]
mov eax, esi
add edx, 0xfffffff0
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x4038de
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov ecx, esi
mov edx, dword [ebp - 0x42c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x403901
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x428]
mov ecx, edi
call fcn.00413164
push 0x587ce0
lea ecx, [ebp - 0x430]
call fcn.00405200
mov edx, 0xef17
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x430]
call fcn.00405340
push dword [ebx]
lea eax, [ebp - 0x428]
push dword [edi + 0xa0]
push dword [ebp - 0x430]
push eax
call fcn.004048d0
add esp, 0x10
mov ecx, edi
push 0x3e8
call fcn.00412e7a
test eax, eax
je 0x40396c
push dword [ebp - 0x428]
mov ecx, eax
call fcn.00413164
push 1
mov ecx, edi
call fcn.00412e7a
mov edx, eax
test edx, edx
je 0x4039b0
mov ecx, dword [edi + 0x1174]
cmp dword [ecx - 0xc], 0
je 0x4039a6
mov ecx, dword [edi + 0x1178]
cmp dword [ecx - 0xc], 0
je 0x4039a6
mov eax, dword [edi + 0x117c]
cmp dword [eax - 0xc], 0
je 0x4039a6
mov eax, 1
jmp 0x4039a8
xor eax, eax
push eax
mov ecx, edx
call fcn.00412e2e
mov byte [ebp - 4], 2
mov ecx, esi
mov edx, dword [ebp - 0x430]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4039d3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x428]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jmp 0x403a66
push 0x587ce0
lea ecx, [ebp - 0x424]
call fcn.00405200
mov edx, 0xef19
mov dword [ebp - 4], 6
lea ecx, [ebp - 0x424]
call fcn.00405340
push 0x3e8
mov ecx, edi
call fcn.00412e7a
test eax, eax
je 0x403a33
push dword [ebp - 0x424]
mov ecx, eax
call fcn.00413164
push 1
mov ecx, edi
call fcn.00412e7a
test eax, eax
je 0x403a49
push 0
mov ecx, eax
call fcn.00412e2e
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
mov edx, dword [ebp - 0x424]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x403a70
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0
lea ecx, [edi + 0xa8]
call fcn.004131a8
push 0
mov ecx, edi
call fcn.00410f68
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0052ace1
mov esp, ebp
pop ebp
ret