Function at 0x42fab0
Capabilities:
Get keyboard layout
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x60bf1e
mov eax, dword fs:[0]
push eax
sub esp, 0xc8
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0xdc]
mov dword fs:[0], eax
xor ebp, ebp
cmp dword [0x678f28], ebp
jne 0x42faf4
cmp dword [esp + 0xec], ebp
je 0x43037a
lea edi, [esp + 0x24]
call fcn.0047ac70
mov dword [esp + 0xe4], ebp
mov eax, dword [esp + 0x24]
mov edx, dword [eax - 0xc]
cmp edx, ebp
jle 0x42fb37
lea ecx, [edx - 1]
cmp ecx, ebp
jl 0x42fbb9
cmp ecx, edx
jg 0x42fbb9
movzx ecx, word [eax + ecx*2]
cmp cx, 0x5c
je 0x42fb37
push 0x5c
call fcn.0040af90
mov eax, dword [esp + 0x24]
lea esi, [eax - 0x10]
mov eax, esi
mov dword [esp + 0x54], esi
call fcn.0040a210
add eax, 0x10
mov dword [esp + 0x28], eax
push 0xc
push str.unuseime.txt
lea eax, [esp + 0x30]
push eax
mov byte [esp + 0xf0], 1
call fcn.0040aee0
mov eax, esi
call fcn.0040a210
add eax, 0x10
mov dword [esp + 0x20], eax
push 0xc
push str.inuseime.txt
lea ecx, [esp + 0x28]
push ecx
mov byte [esp + 0xf0], 2
call fcn.0040aee0
mov dword [esp + 0x2c], ebp
mov edx, dword [esp + 0x28]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push ebp
push 0x80
push 2
push ebp
push 1
push 0xc0000000
push edx
call edi
cmp eax, 0xffffffff
jne 0x42fbc3
call fcn.0040f010
jmp 0x42fbc9
push 0x80070057
call fcn.00403650
mov ebp, eax
mov dword [esp + 0x2c], ebp
push 0
lea eax, [esp + 0x1c]
push eax
push 2
lea ecx, [esp + 0x58]
push ecx
mov ebx, 0xfeff
push ebp
mov dword [esp + 0x60], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x42fbf0
call fcn.0040f010
xor ebp, ebp
mov dword [esp + 0x1c], ebp
push ebp
push 0x80
push 2
push ebp
push 1
mov byte [esp + 0xf8], 4
mov edx, dword [esp + 0x34]
push 0xc0000000
push edx
call edi
cmp eax, 0xffffffff
jne 0x42fc21
call fcn.0040f010
jmp 0x42fc27
mov ebp, eax
mov dword [esp + 0x1c], ebp
push 0
lea eax, [esp + 0x1c]
push eax
push 2
lea ecx, [esp + 0x5c]
push ecx
push ebp
mov dword [esp + 0x64], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x42fc49
call fcn.0040f010
mov edx, dword [0x67ba4c]
mov ebp, dword [edx]
mov ebx, 0x67ba48
mov dword [esp + 0x34], ebp
mov dword [esp + 0x30], ebx
mov edi, edi
test ebx, ebx
mov edi, dword [0x67ba4c]
je 0x42fc72
cmp ebx, 0x67ba48
je 0x42fc77
call fcn.005d29f1
cmp ebp, edi
je 0x430122
test ebx, ebx
jne 0x42fc88
call fcn.005d29f1
cmp ebp, dword [ebx + 4]
jne 0x42fc92
call fcn.005d29f1
cmp dword [ebp + 0x10], 0
jne 0x42fd70
cmp ebp, dword [ebx + 4]
jne 0x42fca6
call fcn.005d29f1
cmp dword [ebp + 0x5c], 0
je 0x42fd3f
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
mov ecx, 0x677600
call edx
add eax, 0x10
mov dword [esp + 0x14], eax
mov byte [esp + 0xe4], 5
cmp ebp, dword [ebx + 4]
jne 0x42fcd8
call fcn.005d29f1
mov eax, dword [ebp + 0x54]
push eax
push str._08x
lea edi, [esp + 0x1c]
call fcn.0040ac80
mov edi, dword [esp + 0x1c]
add esp, 8
push 0x10
push edi
call dword [sym.imp.USER32.dll_LoadKeyboardLayoutW]
cmp ebp, dword [ebx + 4]
jne 0x42fd04
call fcn.005d29f1
lea ecx, [ebp + 0xc]
push 1
push ecx
call fcn.0042ce60
lea eax, [edi - 0x10]
add esp, 8
mov byte [esp + 0xe4], 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x42fdfc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x42fdfc
cmp ebp, dword [ebx + 4]
jne 0x42fd49
call fcn.005d29f1
mov ecx, dword [ebp + 0x54]
push ecx
call dword [sym.imp.USER32.dll_UnloadKeyboardLayout]
cmp ebp, dword [ebx + 4]
jne 0x42fd5d
call fcn.005d29f1
lea edx, [ebp + 0xc]
push 0
push edx
call fcn.0042ce60
add esp, 8
jmp 0x42fdfc
cmp ebp, dword [ebx + 4]
jne 0x42fd7a
call fcn.005d29f1
cmp dword [ebp + 0x10], 1
jne 0x42fdfc
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
lea eax, [esp + 0x18]
push eax
push 0x616648
push 1
push 0
push 0x6167e8
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x42fdf6
cmp ebp, dword [ebx + 4]
jne 0x42fdcd
call fcn.005d29f1
cmp ebp, dword [ebx + 4]
jne 0x42fdcd
call fcn.005d29f1
cmp ebp, dword [ebx + 4]
jne 0x42fdcd
call fcn.005d29f1
cmp ebp, dword [ebx + 4]
jne 0x42fdcd
call fcn.005d29f1
mov edx, dword [ebp + 0x5c]
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
push edx
lea edx, [ebp + 0x3c]
push edx
movzx edx, word [ebp + 0x24]
push edx
lea edx, [ebp + 0x14]
push edx
push eax
mov eax, dword [ecx + 0x44]
call eax
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
call dword [sym.imp.ole32.dll_CoUninitialize]
cmp ebp, dword [ebx + 4]
jne 0x42fe06
call fcn.005d29f1
cmp dword [ebp + 0x5c], 0
mov ecx, 0x677600
je 0x42ff92
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
call edx
add eax, 0x10
mov dword [esp + 0x14], eax
mov byte [esp + 0xe4], 6
cmp ebp, dword [ebx + 4]
jne 0x42fe38
call fcn.005d29f1
mov eax, dword [ebp + 0x54]
push eax
push 0x6275cc
lea edi, [esp + 0x1c]
call fcn.0040ac80
add esp, 8
push 1
push 0x6275d4
mov ecx, edi
push ecx
call fcn.0040aee0
cmp ebp, dword [ebx + 4]
jne 0x42fe66
call fcn.005d29f1
mov eax, dword [ebp + 0x4c]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea edx, [esp + 0x1c]
push edx
call fcn.0040aee0
push 1
push 0x6275d4
lea eax, [esp + 0x1c]
push eax
call fcn.0040aee0
cmp ebp, dword [ebx + 4]
jne 0x42fe93
call fcn.005d29f1
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax - 0xc]
lea edi, [ebp + 0xc]
push ecx
push eax
lea ecx, [esp + 0x1c]
push ecx
call fcn.0040aee0
push 2
push 0x625fc4
lea edx, [esp + 0x1c]
push edx
call fcn.0040aee0
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx - 0xc]
mov esi, dword [esp + 0x1c]
push 0
lea edx, [esp + 0x5c]
push edx
add eax, eax
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x42fedf
call fcn.0040f010
push 2
xor eax, eax
lea ecx, [esp + 0x84]
push ecx
push eax
push esi
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x42ff0b
call fcn.0040f010
cmp ebp, dword [ebx + 4]
mov edx, dword [0x67ba58]
mov dword [esp + 0xbc], edx
jne 0x42ff22
call fcn.005d29f1
lea eax, [esp + 0xc0]
push eax
mov eax, edi
mov esi, 0x67ba54
call fcn.00431c30
mov esi, eax
mov eax, dword [esi]
test eax, eax
je 0x42ff45
cmp eax, 0x67ba54
je 0x42ff4a
call fcn.005d29f1
mov ecx, dword [esp + 0xbc]
cmp dword [esi + 4], ecx
je 0x4300e0
cmp ebp, dword [ebx + 4]
jne 0x42ff64
call fcn.005d29f1
lea edx, [esp + 0xc8]
push edx
mov eax, edi
mov esi, 0x67ba54
call fcn.00431c30
mov ecx, dword [eax + 4]
mov edx, dword [eax]
push ecx
push edx
lea eax, [esp + 0xd8]
push eax
push esi
call fcn.00431930
jmp 0x4300e0
mov edx, dword [0x677600]
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov byte [esp + 0xe4], 7
cmp ebp, dword [ebx + 4]
jne 0x42ffb6
call fcn.005d29f1
mov ecx, dword [ebp + 0x54]
push ecx
push 0x6275cc
lea edi, [esp + 0x1c]
call fcn.0040ac80
add esp, 8
push 1
push 0x6275d4
mov edx, edi
push edx
call fcn.0040aee0
cmp ebp, dword [ebx + 4]
jne 0x42ffe4
call fcn.005d29f1
mov eax, dword [ebp + 0x4c]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.0040aee0
push 1
push 0x6275d4
lea ecx, [esp + 0x1c]
push ecx
call fcn.0040aee0
cmp ebp, dword [ebx + 4]
jne 0x430011
call fcn.005d29f1
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax - 0xc]
lea ebx, [ebp + 0xc]
push ecx
push eax
lea edx, [esp + 0x1c]
push edx
call fcn.0040aee0
push 2
push 0x625fc4
lea eax, [esp + 0x1c]
push eax
call fcn.0040aee0
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx - 0xc]
mov esi, dword [esp + 0x2c]
xor edi, edi
push edi
lea edx, [esp + 0x4c]
push edx
add eax, eax
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, edi
jne 0x43005e
call fcn.0040f010
push 2
lea ecx, [esp + 0x64]
push ecx
push edi
push esi
mov dword [esp + 0x6c], edi
mov dword [esp + 0x70], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x43007f
call fcn.0040f010
mov esi, dword [esp + 0x30]
cmp ebp, dword [esi + 4]
jne 0x430097
call fcn.005d29f1
cmp ebp, dword [esi + 4]
jne 0x430097
call fcn.005d29f1
push 0x67ba54
mov ecx, ebx
call fcn.004317e0
mov edx, dword [ebx + 4]
mov ebp, eax
mov dword [ebp], edx
lea esi, [ebx + 8]
lea edi, [ebp + 4]
mov ecx, 0xe
rep movsd dword es:[edi], dword [esi]
lea edi, [ebp + 0x3c]
lea eax, [ebx + 0x40]
call fcn.0040ab90
lea edi, [ebp + 0x40]
lea eax, [ebx + 0x44]
call fcn.0040ab90
mov eax, dword [ebx + 0x48]
mov dword [ebp + 0x44], eax
mov ecx, dword [ebx + 0x4c]
mov dword [ebp + 0x48], ecx
mov edx, dword [ebx + 0x50]
mov dword [ebp + 0x4c], edx
mov byte [esp + 0xe4], 4
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x430108
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esi, [esp + 0x30]
call fcn.00433280
mov ebp, dword [esp + 0x34]
mov ebx, dword [esp + 0x30]
mov esi, dword [esp + 0x54]
jmp 0x42fc60
cmp dword [esp + 0x1c], 0
je 0x43013c
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebp, ebp
mov dword [esp + 0x1c], ebp
jmp 0x43013e
xor ebp, ebp
mov ebx, 0xa
mov dword [esp + 0x64], ebp
mov dword [esp + 0x68], ebp
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x70], ebp
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebp
mov dword [esp + 0x88], ebp
mov dword [esp + 0x8c], ebp
mov dword [esp + 0x90], ebp
mov dword [esp + 0x94], ebp
mov dword [esp + 0x98], ebx
mov dword [esp + 0x9c], ebp
mov dword [esp + 0xa0], ebp
mov dword [esp + 0xa4], ebp
mov dword [esp + 0xa8], ebp
mov dword [esp + 0xac], ebp
mov dword [esp + 0xb0], ebx
mov dword [esp + 0xb4], ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], ebp
mov dword [esp + 0x44], ebp
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x64]
push edx
lea eax, [esp + 0xb0]
push eax
lea ecx, [esp + 0x9c]
push ecx
lea edx, [esp + 0x7c]
mov byte [esp + 0xfc], 0xb
push edx
mov dword [esp + 0x34], ebp
call fcn.00485010
add esp, 0x1c
xor edi, edi
test byte [esp + 0x18], 8
je 0x430204
lea edi, [ebx - 9]
call fcn.00478e90
test eax, eax
jne 0x430221
call fcn.00478f30
test eax, eax
jne 0x430221
push edi
call fcn.0042cfc0
add esp, 4
jmp 0x43022f
cmp edi, ebp
je 0x43022a
call fcn.0042eaa0
call fcn.0042e3c0
push ebp
push ebp
call dword [sym.imp.USER32.dll_GetKeyboardLayoutList]
mov byte [esp + 0xe4], bl
mov edi, dword [esp + 0x3c]
cmp edi, ebp
je 0x430282
mov eax, dword [esp + 0x40]
cmp edi, eax
mov ebx, eax
je 0x430279
mov eax, dword [edi]
sub eax, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x43026e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add edi, 4
cmp edi, ebx
jne 0x430250
mov edi, dword [esp + 0x3c]
push edi
call fcn.005d2367
add esp, 4
lea edi, [esp + 0xa0]
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], ebp
mov dword [esp + 0x44], ebp
call fcn.004c5700
mov eax, dword [esp + 0xb4]
cmp eax, ebp
je 0x4302ae
push eax
call fcn.005d27e0
add esp, 4
lea edi, [esp + 0x88]
call fcn.004c5700
mov eax, dword [esp + 0x9c]
cmp eax, ebp
je 0x4302ce
push eax
call fcn.005d27e0
add esp, 4
lea edi, [esp + 0x64]
call fcn.00433d90
mov eax, dword [esp + 0x78]
cmp eax, ebp
je 0x4302e8
push eax
call fcn.005d27e0
add esp, 4
mov eax, dword [esp + 0x1c]
cmp eax, ebp
je 0x4302f7
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x2c]
cmp eax, ebp
je 0x430306
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [esp + 0xe4], 1
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x43032e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xe4], 0
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x430356
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0xe4], 0xffffffff
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x43037a
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov ecx, dword [esp + 0xdc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd4
ret