Function at 0x42fc00
Capabilities:
Get keyboard layout
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x5a7a10
mov eax, dword fs:[0]
push eax
sub esp, 0x70
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5f13cc]
xor eax, esp
push eax
lea eax, [esp + 0x84]
mov dword fs:[0], eax
xor ebx, ebx
cmp dword [0x5fe5e4], ebx
jne 0x42fc41
cmp dword [esp + 0x94], ebx
je 0x430330
lea edi, [esp + 0x1c]
call fcn.00474ab0
mov dword [esp + 0x8c], ebx
mov eax, dword [esp + 0x1c]
mov edx, dword [eax - 0xc]
cmp edx, ebx
jle 0x42fc84
lea ecx, [edx - 1]
cmp ecx, ebx
jl 0x42fd06
cmp ecx, edx
jg 0x42fd06
movzx ecx, word [eax + ecx*2]
cmp cx, 0x5c
je 0x42fc84
push 0x5c
call fcn.00404400
mov eax, dword [esp + 0x1c]
lea esi, [eax - 0x10]
mov eax, esi
mov dword [esp + 0x38], esi
call fcn.00403ce0
add eax, 0x10
mov dword [esp + 0x28], eax
push 0xc
push str.unuseime.txt
lea eax, [esp + 0x30]
push eax
mov byte [esp + 0x98], 1
call fcn.00403fc0
mov eax, esi
call fcn.00403ce0
add eax, 0x10
mov dword [esp + 0x24], eax
push 0xc
push str.inuseime.txt
lea ecx, [esp + 0x2c]
push ecx
mov byte [esp + 0x98], 2
call fcn.00403fc0
mov dword [esp + 0x20], ebx
mov edx, dword [esp + 0x28]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push ebx
push 0x80
push 2
push ebx
push 1
push 0xc0000000
push edx
call edi
cmp eax, 0xffffffff
jne 0x42fd10
call fcn.004129d0
jmp 0x42fd16
push 0x80070057
call fcn.00404550
mov ebx, eax
mov dword [esp + 0x20], ebx
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [esp + 0x30]
push eax
push 2
lea ecx, [esp + 0x3c]
push ecx
push ebx
mov dword [esp + 0x44], 0xfeff
call ebp
test eax, eax
jne 0x42fd3e
call fcn.004129d0
xor ebx, ebx
mov dword [esp + 0x18], ebx
push ebx
push 0x80
push 2
push ebx
push 1
mov byte [esp + 0xa0], 4
mov edx, dword [esp + 0x38]
push 0xc0000000
push edx
call edi
cmp eax, 0xffffffff
jne 0x42fd6f
call fcn.004129d0
jmp 0x42fd75
mov ebx, eax
mov dword [esp + 0x18], ebx
push 0
lea eax, [esp + 0x30]
push eax
push 2
lea ecx, [esp + 0x40]
push ecx
push ebx
mov dword [esp + 0x48], 0xfeff
call ebp
test eax, eax
jne 0x42fd97
call fcn.004129d0
mov edx, dword [0x5fff6c]
mov ebp, dword [edx]
mov ebx, 0x5fff68
mov dword [esp + 0x48], ebp
mov dword [esp + 0x44], ebx
lea esp, [esp]
test ebx, ebx
mov edi, dword [0x5fff6c]
je 0x42fdc2
cmp ebx, 0x5fff68
je 0x42fdc7
call fcn.00578ff3
cmp ebp, edi
je 0x43025d
test ebx, ebx
jne 0x42fdd8
call fcn.00578ff3
cmp ebp, dword [ebx + 4]
jne 0x42fde2
call fcn.00578ff3
cmp dword [ebp + 0x10], 0
jne 0x42fec0
cmp ebp, dword [ebx + 4]
jne 0x42fdf6
call fcn.00578ff3
cmp dword [ebp + 0x5c], 0
je 0x42fe8f
mov eax, dword [0x5fcd20]
mov edx, dword [eax + 0xc]
mov ecx, 0x5fcd20
call edx
add eax, 0x10
mov dword [esp + 0x14], eax
mov byte [esp + 0x8c], 5
cmp ebp, dword [ebx + 4]
jne 0x42fe28
call fcn.00578ff3
mov eax, dword [ebp + 0x54]
push eax
push str._08x
lea edi, [esp + 0x1c]
call fcn.004126f0
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 0x42fe54
call fcn.00578ff3
lea ecx, [ebp + 0xc]
push 1
push ecx
call fcn.0042d810
lea eax, [edi - 0x10]
add esp, 8
mov byte [esp + 0x8c], 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x42ff4c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x42ff4c
cmp ebp, dword [ebx + 4]
jne 0x42fe99
call fcn.00578ff3
mov ecx, dword [ebp + 0x54]
push ecx
call dword [sym.imp.USER32.dll_UnloadKeyboardLayout]
cmp ebp, dword [ebx + 4]
jne 0x42fead
call fcn.00578ff3
lea edx, [ebp + 0xc]
push 0
push edx
call fcn.0042d810
add esp, 8
jmp 0x42ff4c
cmp ebp, dword [ebx + 4]
jne 0x42feca
call fcn.00578ff3
cmp dword [ebp + 0x10], 1
jne 0x42ff4c
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
lea eax, [esp + 0x2c]
push eax
push 0x5b2578
push 1
push 0
push 0x5b2718
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x42ff46
cmp ebp, dword [ebx + 4]
jne 0x42ff1d
call fcn.00578ff3
cmp ebp, dword [ebx + 4]
jne 0x42ff1d
call fcn.00578ff3
cmp ebp, dword [ebx + 4]
jne 0x42ff1d
call fcn.00578ff3
cmp ebp, dword [ebx + 4]
jne 0x42ff1d
call fcn.00578ff3
mov edx, dword [ebp + 0x5c]
mov eax, dword [esp + 0x2c]
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 + 0x2c]
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 0x42ff56
call fcn.00578ff3
cmp dword [ebp + 0x5c], 0
mov ecx, 0x5fcd20
je 0x4300cd
mov eax, dword [0x5fcd20]
mov edx, dword [eax + 0xc]
call edx
add eax, 0x10
mov dword [esp + 0x14], eax
mov byte [esp + 0x8c], 6
cmp ebp, dword [ebx + 4]
jne 0x42ff88
call fcn.00578ff3
mov eax, dword [ebp + 0x54]
push eax
push 0x5bef9c
lea edi, [esp + 0x1c]
call fcn.004126f0
add esp, 8
push 1
push 0x5befa4
mov ecx, edi
push ecx
call fcn.00403fc0
cmp ebp, dword [ebx + 4]
jne 0x42ffb6
call fcn.00578ff3
mov eax, dword [ebp + 0x4c]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea edx, [esp + 0x1c]
push edx
call fcn.00403fc0
push 1
push 0x5befa4
lea eax, [esp + 0x1c]
push eax
call fcn.00403fc0
cmp ebp, dword [ebx + 4]
jne 0x42ffe3
call fcn.00578ff3
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.00403fc0
push 2
push 0x5bdf38
lea edx, [esp + 0x1c]
push edx
call fcn.00403fc0
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx - 0xc]
mov esi, dword [esp + 0x18]
push 0
lea edx, [esp + 0x40]
push edx
add eax, eax
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x43002f
call fcn.004129d0
push 2
xor eax, eax
lea ecx, [esp + 0x54]
push ecx
push eax
push esi
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x430052
call fcn.004129d0
cmp ebp, dword [ebx + 4]
mov edx, dword [0x5fff78]
mov dword [esp + 0x64], edx
jne 0x430066
call fcn.00578ff3
lea eax, [esp + 0x68]
push eax
mov eax, edi
mov esi, 0x5fff74
call fcn.00431be0
mov esi, eax
mov eax, dword [esi]
test eax, eax
je 0x430086
cmp eax, 0x5fff74
je 0x43008b
call fcn.00578ff3
mov ecx, dword [esp + 0x64]
cmp dword [esi + 4], ecx
je 0x43021b
cmp ebp, dword [ebx + 4]
jne 0x4300a2
call fcn.00578ff3
lea edx, [esp + 0x70]
push edx
mov eax, edi
mov esi, 0x5fff74
call fcn.00431be0
mov ecx, dword [eax + 4]
mov edx, dword [eax]
push ecx
push edx
lea eax, [esp + 0x80]
push eax
push esi
call fcn.004318e0
jmp 0x43021b
mov edx, dword [0x5fcd20]
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov byte [esp + 0x8c], 7
cmp ebp, dword [ebx + 4]
jne 0x4300f1
call fcn.00578ff3
mov ecx, dword [ebp + 0x54]
push ecx
push 0x5bef9c
lea edi, [esp + 0x1c]
call fcn.004126f0
add esp, 8
push 1
push 0x5befa4
mov edx, edi
push edx
call fcn.00403fc0
cmp ebp, dword [ebx + 4]
jne 0x43011f
call fcn.00578ff3
mov eax, dword [ebp + 0x4c]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.00403fc0
push 1
push 0x5befa4
lea ecx, [esp + 0x1c]
push ecx
call fcn.00403fc0
cmp ebp, dword [ebx + 4]
jne 0x43014c
call fcn.00578ff3
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.00403fc0
push 2
push 0x5bdf38
lea eax, [esp + 0x1c]
push eax
call fcn.00403fc0
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx - 0xc]
mov esi, dword [esp + 0x20]
xor edi, edi
push edi
lea edx, [esp + 0x44]
push edx
add eax, eax
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, edi
jne 0x430199
call fcn.004129d0
push 2
lea ecx, [esp + 0x5c]
push ecx
push edi
push esi
mov dword [esp + 0x64], edi
mov dword [esp + 0x68], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4301ba
call fcn.004129d0
mov esi, dword [esp + 0x44]
cmp ebp, dword [esi + 4]
jne 0x4301d2
call fcn.00578ff3
cmp ebp, dword [esi + 4]
jne 0x4301d2
call fcn.00578ff3
push 0x5fff74
mov ecx, ebx
call fcn.00431790
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.004035d0
lea edi, [ebp + 0x40]
lea eax, [ebx + 0x44]
call fcn.004035d0
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 + 0x8c], 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 0x430243
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esi, [esp + 0x44]
call fcn.00433210
mov ebp, dword [esp + 0x48]
mov ebx, dword [esp + 0x44]
mov esi, dword [esp + 0x38]
jmp 0x42fdb0
cmp dword [esp + 0x18], 0
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x430279
mov ecx, dword [esp + 0x18]
push ecx
call ebx
xor edi, edi
mov dword [esp + 0x18], edi
jmp 0x43027d
mov edi, dword [esp + 0x18]
call fcn.00472c20
test eax, eax
jne 0x430296
call fcn.00472cc0
test eax, eax
jne 0x430296
call fcn.0042d970
jmp 0x4302a0
call fcn.0042ebf0
call fcn.0042e510
push 0
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayoutList]
test edi, edi
je 0x4302b1
push edi
call ebx
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4302bc
push eax
call ebx
mov byte [esp + 0x8c], 1
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4302e4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x8c], 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 0x43030c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x8c], 0xffffffff
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x430330
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov ecx, dword [esp + 0x84]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret