Function at 0x100509d7
Capabilities:
Identify system language via api
Parse pe header

Disassembly:
push 0x40
mov eax, 0x100e6a6e
call fcn.100c747c
and dword [ebp - 0x14], 0
push 4
pop edi
push edi
call fcn.100a20ff
pop ecx
test eax, eax
je 0x100509fc
lea ecx, [ebp - 0x4c]
mov dword [eax], ecx
jmp 0x100509fe
xor eax, eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 4], 1
call fcn.1002af43
mov dword [ebp - 0x34], eax
mov byte [eax + 0x2d], 1
mov eax, dword [ebp - 0x34]
mov dword [eax + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [eax], eax
mov eax, dword [ebp - 0x34]
mov dword [eax + 8], eax
and dword [ebp - 0x30], 0
push 2
pop esi
lea eax, [ebp - 0x4c]
mov dword [ebp - 4], esi
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x36
call fcn.100526f5
push 0x1010db3c
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x1c
call fcn.100526f5
push 0x1010db40
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 1
call fcn.100526f5
push 0x1010db44
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x2b
call fcn.100526f5
push 0x1010db48
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x4d
call fcn.100526f5
push 0x1010db4c
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x2c
call fcn.100526f5
push 0x1010db50
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x2d
call fcn.100526f5
push 0x1010db54
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x23
call fcn.100526f5
push 0x1010db58
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x45
call fcn.100526f5
push 0x1010db5c
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], esi
call fcn.100526f5
push 0x1010db60
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 3
call fcn.100526f5
push 0x1010db64
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], edi
call fcn.100526f5
push 0x1010db68
mov ecx, eax
call fcn.1000d1ad
push 0x1a
pop esi
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], esi
call fcn.100526f5
push 0x1010db6c
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 5
call fcn.100526f5
push 0x1010db70
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 6
call fcn.100526f5
push 0x1010db74
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x65
call fcn.100526f5
push 0x1010db78
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x13
call fcn.100526f5
push 0x1010db7c
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 9
call fcn.100526f5
push 0x1010db80
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x25
call fcn.100526f5
push 0x1010db84
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x38
call fcn.100526f5
push 0x1010db88
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x29
call fcn.100526f5
push 0x1010db8c
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0xb
call fcn.100526f5
push 0x1010db90
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0xc
call fcn.100526f5
push 0x1010db94
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x37
call fcn.100526f5
push 0x1010db98
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 7
call fcn.100526f5
push 0x1010db9c
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 8
call fcn.100526f5
push 0x1010dba0
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x47
call fcn.100526f5
push 0x1010dba4
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0xd
call fcn.100526f5
push 0x1010dba8
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x39
call fcn.100526f5
push 0x1010dbac
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0xe
call fcn.100526f5
push 0x1010dbb0
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0xf
call fcn.100526f5
push 0x1010dbb4
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x21
call fcn.100526f5
push 0x1010dbb8
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x10
call fcn.100526f5
push 0x1010dbbc
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x11
call fcn.100526f5
push 0x1010dbc0
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x4b
call fcn.100526f5
push 0x1010dbc4
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x3f
call fcn.100526f5
push 0x1010dbc8
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x57
call fcn.100526f5
push 0x1010dbcc
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x12
call fcn.100526f5
push 0x1010dbd0
mov ecx, eax
call fcn.1000d1ad
mov dword [ebp - 0x18], 0x26
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
call fcn.100526f5
push 0x1010dbd4
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x27
call fcn.100526f5
push 0x1010dbd8
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x2f
call fcn.100526f5
push 0x1010dbdc
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x3e
call fcn.100526f5
push 0x1010dbe0
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x4c
call fcn.100526f5
push 0x1010dbe4
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x4e
call fcn.100526f5
push 0x1010dbe8
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x50
call fcn.100526f5
push 0x1010dbec
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x61
call fcn.100526f5
push 0x1010dbf0
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x14
call fcn.100526f5
push 0x10102e1c
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x48
call fcn.100526f5
push 0x1010dbf4
mov ecx, eax
call fcn.1000d1ad
mov dword [ebp - 0x18], 0x15
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
call fcn.100526f5
push 0x1010dbf8
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x16
call fcn.100526f5
push 0x1010dbfc
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x46
call fcn.100526f5
push 0x1010dc00
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x18
call fcn.100526f5
push 0x1010dc04
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x19
call fcn.100526f5
push 0x1010dc08
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x4f
call fcn.100526f5
push 0x1010d1b4
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], esi
call fcn.100526f5
push 0x1010dc0c
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x1b
call fcn.100526f5
push 0x1010dc10
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x24
call fcn.100526f5
push 0x1010dc14
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0xa
call fcn.100526f5
push 0x1010dc18
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x18], 0x41
push eax
lea ebx, [ebp - 0x18]
call fcn.100526f5
push 0x1010dc1c
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x1d
call fcn.100526f5
push 0x1010dc20
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x5a
call fcn.100526f5
push 0x1010dc24
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x49
call fcn.100526f5
push 0x1010dc28
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x44
call fcn.100526f5
push 0x1010dc2c
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x4a
call fcn.100526f5
push 0x1010dc30
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x1e
call fcn.100526f5
push 0x1010dc34
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x1f
call fcn.100526f5
push 0x1010dc38
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x22
call fcn.100526f5
push 0x1010dc3c
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x20
call fcn.100526f5
push 0x1010dc40
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x18], 0x43
push eax
lea ebx, [ebp - 0x18]
call fcn.100526f5
push 0x1010dc44
mov ecx, eax
call fcn.1000d1ad
lea eax, [ebp - 0x4c]
push eax
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x2a
call fcn.100526f5
push 0x1010dc48
mov ecx, eax
call fcn.1000d1ad
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
movzx eax, ax
and eax, 0x3ff
mov ebx, eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x24]
lea esi, [ebp - 0x4c]
mov dword [ebp - 0x18], ebx
call fcn.10052a94
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x4c]
lea edi, [ebp - 0x1c]
lea esi, [ebp - 0x24]
mov dword [ebp - 0x1c], eax
call fcn.10056222
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x4c]
test al, al
jne 0x100512eb
mov eax, dword [ebp - 0x20]
cmp ebx, dword [eax + 0xc]
jb 0x100512eb
mov eax, esi
jmp 0x100512f4
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x2c], edx
lea eax, [ebp - 0x2c]
mov esi, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0x1c], esi
lea edi, [ebp - 0x2c]
lea esi, [ebp - 0x1c]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x2c], edx
call fcn.10056222
test al, al
jne 0x10051327
call fcn.100156f8
mov ecx, dword [ebp + 8]
add eax, 4
push eax
call fcn.1000d047
jmp 0x10051334
mov ecx, dword [ebp + 8]
push 0x1010db80
call fcn.1000d025
lea eax, [ebp - 0x4c]
push eax
mov dword [ebp - 0x14], 1
mov byte [ebp - 4], 0
call fcn.100527e3
mov eax, dword [ebp + 8]
call fcn.100c7554
ret