Function at 0x30051211
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x5c
push ebx
mov ebx, dword [esp + 0x64]
push ebp
xor ebp, ebp
cmp bx, 0x400
push esi
push edi
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x54], ebp
mov esi, ebx
jne 0x30051237
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
jmp 0x30051244
cmp bx, 0x800
jne 0x30051246
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLCID]
mov esi, eax
cmp esi, dword [0x30065bd0]
jne 0x3005128d
cmp dword [0x300bb9d4], ebp
je 0x30051286
mov eax, dword [esp + 0x84]
mov ecx, dword [esp + 0x80]
mov edx, dword [esp + 0x7c]
push eax
mov eax, dword [esp + 0x7c]
push ecx
mov ecx, dword [esp + 0x7c]
push edx
push eax
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_CompareStringW]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret 0x18
mov esi, 1
jmp 0x30051303
xor eax, eax
push 0x300a38ec
mov ecx, 0xd
mov edi, 0x300a38ec
push esi
rep stosd dword es:[edi], eax
call fcn.3004e620
call fcn.3004e6d2
push esi
mov dword [0x30065bd0], esi
call fcn.3004e71f
add esp, 0xc
test eax, eax
jne 0x300512f8
mov edx, dword [esp + 0x84]
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x7c]
push edx
mov edx, dword [esp + 0x7c]
push eax
mov eax, dword [esp + 0x7c]
push ecx
push edx
push eax
push ebx
mov dword [0x300bb9d4], 1
call dword [sym.imp.KERNEL32.dll_CompareStringW]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret 0x18
mov dword [0x300bb9d4], ebp
mov esi, 4
mov eax, dword [esp + 0x74]
mov edx, dword [esp + 0x84]
mov ecx, dword [esp + 0x7c]
and eax, 0xbfffffff
cmp dword [0x300a3908], ebp
mov dword [esp + 0x68], esi
jne 0x30051d84
cmp ecx, 0xffffffff
jg 0x30051d84
cmp edx, 0xffffffff
jg 0x30051d8e
cmp eax, 1
ja 0x30051d84
test ebx, 0xfff00000
jne 0x30051d70
mov ebp, dword [esp + 0x78]
mov edx, dword [esp + 0x80]
xor esi, esi
cmp ebp, esi
mov dword [esp + 0x70], ebp
mov dword [esp + 0x84], edx
je 0x30051d70
cmp edx, esi
je 0x30051d70
mov cx, word [ebp]
cmp cx, word [edx]
jne 0x3005143e
cmp cx, si
je 0x30051433
mov cx, word [ebp + 2]
add ebp, 2
add edx, 2
cmp cx, word [edx]
jne 0x30051433
cmp cx, si
je 0x30051433
mov cx, word [ebp + 2]
add ebp, 2
add edx, 2
cmp cx, word [edx]
jne 0x30051433
cmp cx, si
je 0x30051433
mov cx, word [ebp + 2]
add ebp, 2
add edx, 2
cmp cx, word [edx]
jne 0x30051433
cmp cx, si
je 0x30051433
mov cx, word [ebp + 2]
add ebp, 2
add edx, 2
cmp cx, word [edx]
jne 0x30051433
cmp cx, si
je 0x30051433
mov cx, word [ebp + 2]
add ebp, 2
add edx, 2
cmp cx, word [edx]
jne 0x30051433
cmp cx, si
je 0x30051433
mov cx, word [ebp + 2]
add ebp, 2
add edx, 2
cmp cx, word [edx]
jne 0x30051433
cmp cx, si
je 0x30051433
mov cx, word [ebp + 2]
add ebp, 2
add edx, 2
cmp cx, word [edx]
jne 0x30051433
cmp cx, si
je 0x30051433
mov cx, word [ebp + 2]
add ebp, 2
add edx, 2
cmp cx, word [edx]
je 0x30051383
mov dword [esp + 0x84], edx
mov dword [esp + 0x70], ebp
mov cx, word [ebp]
cmp cx, word [edx]
je 0x30051d1e
neg eax
sbb eax, eax
and eax, 0xe8000000
add eax, 0xffffffff
mov edi, eax
xor eax, eax
cmp dword [0x300a3904], esi
mov dword [esp + 0x40], esi
setne al
mov dword [esp + 0x38], esi
mov dword [esp + 0x5c], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x58], esi
add eax, 1
or al, 4
mov dword [esp + 0x14], esi
mov dword [esp + 0x7c], esi
mov dword [esp + 0x48], edi
mov dword [esp + 0x20], eax
mov ax, cx
cmp ax, si
je 0x30051cb5
jmp 0x300514a7
mov edi, dword [esp + 0x48]
mov si, word [edx]
test si, si
je 0x30051cae
lea edx, [esp + 0x1c]
push edx
push eax
call fcn.3004f36f
lea eax, [esp + 0x20]
push eax
push esi
call fcn.3004f36f
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
and eax, edi
and ecx, edi
add esp, 0x10
cmp eax, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], ecx
je 0x30051c47
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
cmp cx, dx
mov al, byte [esp + 0x1d]
mov byte [esp + 0x74], al
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], edx
jne 0x3005150d
cmp al, 3
jne 0x30051b74
xor ecx, ecx
test al, al
mov dword [esp + 0x3c], ecx
mov edx, 1
jne 0x30051529
add ebp, 2
mov ecx, edx
mov dword [esp + 0x70], ebp
mov dword [esp + 0x3c], ecx
mov ebx, dword [esp + 0x18]
shr ebx, 8
test bl, bl
jne 0x3005154a
mov edx, dword [esp + 0x84]
add edx, 2
mov dword [esp + 0x84], edx
jmp 0x30051c8e
test ecx, ecx
jne 0x30051c87
movzx eax, al
add eax, 0xffffffff
cmp eax, 5
ja case.0x30051561.3
jmp dword [eax*4 + 0x30051dc8]
cmp dword [esp + 0x38], 0
je 0x30051576
test byte [esp + 0x20], 2
je 0x30051583
and dword [esp + 0x20], 0xfffffffe
mov dword [esp + 0x38], 3
add ebp, 2
mov dword [esp + 0x70], ebp
mov dword [esp + 0x3c], edx
jmp case.0x30051561.3
cmp dword [esp + 0x40], 0
je 0x300515aa
add ebp, 2
mov dword [esp + 0x70], ebp
mov dword [esp + 0x3c], edx
jmp case.0x30051561.3
cmp byte [esp + 0x19], 6
je case.0x30051561.3
cmp dword [esp + 0x34], 0
je 0x300515d8
add ebp, 2
mov dword [esp + 0x34], 3
mov dword [esp + 0x40], edx
mov dword [esp + 0x70], ebp
mov dword [esp + 0x3c], edx
jmp case.0x30051561.3
add ebp, 2
mov dword [esp + 0x28], 3
mov dword [esp + 0x70], ebp
mov dword [esp + 0x3c], edx
jmp case.0x30051561.3
movzx eax, byte [esp + 0x1c]
mov ecx, dword [0x30065420]
mov ecx, dword [ecx + 0x28]
lea eax, [ecx + eax*4]
mov cx, word [eax]
mov ax, word [eax + 2]
mov dword [esp + 0x50], ebp
lea ebp, [esp + 0x60]
mov dword [esp + 0x70], ebp
mov word [esp + 0x60], cx
mov word [esp + 0x62], ax
mov dword [esp + 0x4c], 2
mov dword [esp + 0x3c], edx
jmp case.0x30051561.3
mov bl, byte [esp + 0x1f]
mov al, byte [esp + 0x1c]
and bl, 0x3f
cmp al, 1
mov ecx, 0xffff0000
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], ecx
ja 0x30051719
lea edx, [ebp - 2]
cmp edx, dword [esp + 0x78]
jb 0x30051740
mov edi, 2
lea esi, [ebp - 2]
mov cx, word [esi]
lea eax, [esp + 0x10]
push eax
push ecx
call fcn.3004f36f
mov ecx, dword [esp + 0x18]
and ecx, dword [esp + 0x50]
add esp, 8
mov dword [esp + 0x10], ecx
mov al, byte [esp + 0x11]
cmp al, 3
jae 0x3005169c
cmp al, 2
mov ecx, 0xffff0000
je 0x30051740
jmp 0x300516ab
jne 0x30051713
mov al, byte [esp + 0x10]
cmp al, 1
ja 0x300516c1
mov ecx, 0xffff0000
add edi, 2
mov edx, ebp
sub edx, edi
sub esi, 2
cmp edx, dword [esp + 0x78]
mov dword [esp + 0x10], ecx
jae 0x30051668
jmp 0x30051740
movzx ax, al
or ah, 0x22
mov word [esp + 0x10], ax
mov al, byte [esp + 0x13]
and al, 0x3f
mov cl, al
and cl, 0xc6
mov byte [esp + 0x14], cl
mov cl, al
and cl, 0xe4
cmp byte [esp + 0x1c], 0
mov byte [esp + 0x16], cl
mov ecx, dword [esp + 0x10]
jne 0x30051701
and al, 0xc5
mov dword [esp + 0x2c], ecx
mov byte [esp + 0x15], 4
mov byte [esp + 0x17], al
jmp 0x30051747
mov eax, ecx
and eax, 0xff87
mov dword [esp + 0x2c], eax
mov byte [esp + 0x15], 5
jmp 0x30051739
mov dword [esp + 0x2c], ecx
jmp 0x30051740
movzx ax, al
or ah, 0x22
mov byte [esp + 0x15], 3
mov dword [esp + 0x2c], eax
mov al, bl
and al, 0xc6
mov byte [esp + 0x14], al
mov al, bl
and al, 0xe4
mov byte [esp + 0x16], al
and bl, 0xc5
mov byte [esp + 0x17], bl
cmp byte [esp + 0x1c], 1
ja 0x30051765
cmp ecx, 0xffff0000
jne 0x30051765
mov dword [esp + 0x2c], 0xffff
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], 0
jmp 0x3005177e
mov eax, dword [esp + 0x1c]
movzx ecx, word [esp + 0x2c]
and eax, 0xffff0000
or eax, ecx
mov dword [esp + 0x1c], eax
mov byte [esp + 0x1f], 2
cmp byte [esp + 0x19], 3
je 0x300517d9
cmp byte [esp + 0x7c], 0
jne 0x30051798
cmp byte [esp + 0x14], 0
je 0x30051798
mov byte [esp + 0x7c], 3
cmp byte [esp + 0x7d], 0
jne 0x300517af
mov eax, dword [esp + 0x14]
shr eax, 8
test al, al
je 0x300517af
mov byte [esp + 0x7d], 3
cmp byte [esp + 0x7e], 0
jne 0x300517c6
mov eax, dword [esp + 0x14]
shr eax, 0x10
test al, al
je 0x300517c6
mov byte [esp + 0x7e], 3
cmp byte [esp + 0x7f], 0
jne 0x300517d9
cmp byte [esp + 0x17], 0
je 0x300517d9
mov byte [esp + 0x7f], 3
mov edx, 1
movzx eax, byte [esp + 0x19]
add eax, 0xffffffff
cmp eax, 5
ja case.0x300517ef.3
jmp dword [eax*4 + 0x30051de0]
cmp dword [esp + 0x38], 0
je 0x30051804
test byte [esp + 0x20], 2
je 0x3005180d
and dword [esp + 0x20], 0xfffffffe
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x84]
add edx, 2
mov dword [esp + 0x84], edx
jmp 0x30051c8e
cmp dword [esp + 0x40], 0
jne 0x300518b0
cmp byte [esp + 0x74], 6
je 0x30051874
cmp dword [esp + 0x28], 0
je 0x3005185a
mov dword [esp + 0x28], edx
mov dword [esp + 0x40], edx
mov edx, dword [esp + 0x84]
add edx, 2
mov dword [esp + 0x84], edx
jmp 0x30051c8e
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x84]
add edx, 2
mov dword [esp + 0x84], edx
jmp 0x30051c8e
cmp dword [esp + 0x28], 0
je 0x30051881
mov dword [esp + 0x28], edx
jmp 0x300518a5
cmp dword [esp + 0x34], 0
je 0x30051892
mov dword [esp + 0x34], 3
jmp 0x300518a5
mov al, byte [esp + 0x1c]
cmp al, byte [esp + 0x18]
sbb eax, eax
and al, 0xfe
add eax, 3
mov dword [esp + 0x28], eax
add ebp, 2
mov dword [esp + 0x70], ebp
mov dword [esp + 0x40], edx
mov edx, dword [esp + 0x84]
add edx, 2
mov dword [esp + 0x84], edx
jmp 0x30051c8e
mov ecx, dword [esp + 0x84]
movzx eax, byte [esp + 0x18]
mov dword [esp + 0x58], ecx
mov ecx, dword [0x30065420]
mov ecx, dword [ecx + 0x28]
lea eax, [ecx + eax*4]
mov cx, word [eax]
mov ax, word [eax + 2]
lea edx, [esp + 0x64]
mov dword [esp + 0x84], edx
mov word [esp + 0x64], cx
mov word [esp + 0x66], ax
mov dword [esp + 0x54], 2
jmp 0x30051c8e
mov bl, byte [esp + 0x1b]
mov al, byte [esp + 0x18]
and bl, 0x3f
cmp al, 1
mov esi, 0xffff0000
mov dword [esp + 0x10], 0
mov dword [esp + 0x24], esi
ja 0x30051a63
mov ecx, dword [esp + 0x84]
add ecx, 0xfffffffe
cmp ecx, dword [esp + 0x80]
jb 0x30051985
mov edi, dword [esp + 0x84]
mov ebp, 2
add edi, 0xfffffffe
lea ecx, [ecx]
mov ax, word [edi]
lea edx, [esp + 0x24]
push edx
push eax
call fcn.3004f36f
mov esi, dword [esp + 0x2c]
and esi, dword [esp + 0x50]
add esp, 8
mov dword [esp + 0x24], esi
mov al, byte [esp + 0x25]
cmp al, 3
jae 0x300519cd
cmp al, 2
mov esi, 0xffff0000
jne 0x300519e0
mov ebp, dword [esp + 0x70]
mov bl, byte [esp + 0x13]
mov dl, byte [esp + 0x12]
mov cl, byte [esp + 0x10]
cmp byte [esp + 0x18], 1
ja 0x30051a85
cmp esi, 0xffff0000
jne 0x30051a85
mov dword [esp + 0x10], 0
mov bl, byte [esp + 0x13]
mov dl, byte [esp + 0x12]
mov cl, byte [esp + 0x10]
mov dword [esp + 0x30], 0xffff
mov dword [esp + 0x18], esi
jmp 0x30051a9e
jne 0x30051a5a
mov al, byte [esp + 0x24]
cmp al, 1
ja 0x30051a05
mov esi, 0xffff0000
mov ecx, dword [esp + 0x84]
add ebp, 2
sub ecx, ebp
sub edi, 2
cmp ecx, dword [esp + 0x80]
mov dword [esp + 0x24], esi
jae 0x30051953
jmp 0x30051981
mov ebp, dword [esp + 0x70]
movzx dx, al
mov al, byte [esp + 0x27]
or dh, 0x22
and al, 0x3f
mov cl, al
and cl, 0xc6
mov word [esp + 0x24], dx
mov esi, dword [esp + 0x24]
mov dl, al
and dl, 0xe4
cmp byte [esp + 0x18], 0
jne 0x30051a42
and al, 0xc5
mov dword [esp + 0x30], esi
mov byte [esp + 0x11], 4
mov bl, al
jmp 0x3005199c
mov eax, esi
and eax, 0xff87
mov dword [esp + 0x30], eax
mov byte [esp + 0x11], 5
and bl, 0xc5
jmp 0x30051991
mov dword [esp + 0x30], esi
jmp 0x30051981
movzx ax, al
or ah, 0x22
mov cl, bl
mov dl, bl
and cl, 0xc6
and dl, 0xe4
mov byte [esp + 0x11], 3
and bl, 0xc5
mov dword [esp + 0x30], eax
jmp 0x30051991
mov eax, dword [esp + 0x18]
movzx esi, word [esp + 0x30]
and eax, 0xffff0000
or eax, esi
mov dword [esp + 0x18], eax
mov byte [esp + 0x1b], 2
cmp byte [esp + 0x74], 3
je 0x30051aee
cmp byte [esp + 0x7c], 0
jne 0x30051ab5
test cl, cl
je 0x30051ab5
mov byte [esp + 0x7c], 1
cmp byte [esp + 0x7d], 0
jne 0x30051acc
mov eax, dword [esp + 0x10]
shr eax, 8
test al, al
je 0x30051acc
mov byte [esp + 0x7d], 1
cmp byte [esp + 0x7e], 0
jne 0x30051adc
test dl, dl
je 0x30051adc
mov byte [esp + 0x7e], 1
cmp byte [esp + 0x7f], 0
jne case.0x300517ef.3
test bl, bl
je case.0x300517ef.3
mov byte [esp + 0x7f], 1
jmp case.0x300517ef.3
cmp byte [esp + 0x7c], 0
jne 0x30051b08
mov al, byte [esp + 0x14]
cmp al, cl
je 0x30051b08
setae cl
lea ecx, [ecx + ecx + 1]
mov byte [esp + 0x7c], cl
cmp byte [esp + 0x7d], 0
jne 0x30051b26
mov cl, byte [esp + 0x15]
mov al, byte [esp + 0x11]
cmp cl, al
je 0x30051b26
setae cl
lea ecx, [ecx + ecx + 1]
mov byte [esp + 0x7d], cl
cmp byte [esp + 0x7e], 0
jne 0x30051b40
mov cl, byte [esp + 0x16]
cmp cl, dl
je 0x30051b40
setae cl
lea ecx, [ecx + ecx + 1]
mov byte [esp + 0x7e], cl
cmp byte [esp + 0x7f], 0
jne case.0x300517ef.3
cmp byte [esp + 0x17], bl
je case.0x300517ef.3
setae al
lea eax, [eax + eax + 1]
mov byte [esp + 0x7f], al
cmp dword [esp + 0x3c], 0
jne 0x30051c87
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x30]
cmp cx, ax
jne 0x30051c9d
test byte [esp + 0x20], 3
je 0x30051c1f
mov al, byte [esp + 0x1e]
mov bl, byte [esp + 0x1a]
cmp al, bl
mov byte [esp + 0x74], al
je 0x30051c1f
mov ax, word [ebp + 2]
test ax, ax
je 0x30051bc8
lea esp, [esp]
lea ecx, [esp + 0x44]
push ecx
push eax
call fcn.3004f36f
add esp, 8
cmp byte [esp + 0x45], 1
jne 0x30051bc8
mov dl, byte [esp + 0x46]
mov ax, word [ebp + 4]
add byte [esp + 0x74], dl
add ebp, 2
test ax, ax
jne 0x30051b9f
mov esi, dword [esp + 0x84]
mov ax, word [esi + 2]
test ax, ax
je 0x30051c07
lea esp, [esp]
lea ecx, [esp + 0x44]
push ecx
push eax
call fcn.3004f36f
add esp, 8
cmp byte [esp + 0x45], 1
jne 0x30051c00
mov ax, word [esi + 4]
add bl, byte [esp + 0x46]
add esi, 2
test ax, ax
jne 0x30051bdb
mov dword [esp + 0x84], esi
mov al, byte [esp + 0x74]
cmp al, bl
je 0x30051c1f
sbb eax, eax
and al, 0xfe
add eax, 3
and dword [esp + 0x20], 0xfffffffe
mov dword [esp + 0x38], eax
test byte [esp + 0x20], 4
je 0x30051c47
mov al, byte [esp + 0x1b]
mov cl, byte [esp + 0x1f]
and al, 0x3f
and cl, 0x3f
cmp cl, al
je 0x30051c47
sbb eax, eax
and al, 0xfe
add eax, 3
and dword [esp + 0x20], 0xfffffffb
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x50]
xor ecx, ecx
cmp eax, ecx
je 0x30051c5e
sub dword [esp + 0x4c], 1
jne 0x30051c5e
mov ebp, eax
mov dword [esp + 0x50], ecx
mov eax, dword [esp + 0x58]
cmp eax, ecx
je 0x30051c78
sub dword [esp + 0x54], 1
jne 0x30051c78
mov dword [esp + 0x84], eax
mov dword [esp + 0x58], ecx
add ebp, 2
add dword [esp + 0x84], 2
mov dword [esp + 0x70], ebp
mov edx, dword [esp + 0x84]
mov ax, word [ebp]
test ax, ax
jne 0x300514a3
jmp 0x30051cb5
sbb eax, eax
and al, 0xfe
pop edi
pop esi
pop ebp
pop ebx
add eax, 3
add esp, 0x5c
ret 0x18
cmp word [ebp], 0
jne 0x30051d2f
cmp word [edx], 0
jne 0x30051d2d
mov eax, dword [esp + 0x38]
test eax, eax
jne 0x30051db9
mov eax, dword [esp + 0x5c]
test eax, eax
jne 0x30051db9
cmp dword [esp + 0x7c], eax
je 0x30051d06
mov al, byte [esp + 0x7c]
test al, al
jne 0x30051cf9
mov al, byte [esp + 0x7d]
test al, al
jne 0x30051cf9
mov al, byte [esp + 0x7e]
test al, al
jne 0x30051cf9
mov al, byte [esp + 0x7f]
test al, al
je 0x30051d06
pop edi
pop esi
pop ebp
movzx eax, al
pop ebx
add esp, 0x5c
ret 0x18
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x30051db9
mov eax, dword [esp + 0x34]
test eax, eax
jne 0x30051db9
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x5c
ret 0x18
mov ebp, edx
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x34]
push eax
mov eax, dword [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x84]
push eax
mov eax, dword [esp + 0x68]
push ecx
mov ecx, dword [esp + 0x48]
push eax
xor eax, eax
cmp word [edx], ax
push ecx
sete al
lea eax, [eax + eax + 1]
push eax
push ebp
call fcn.3004e588
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret 0x18
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x5c
ret 0x18
cmp edx, 0xffffffff
jg 0x30051d8e
mov edx, 0xfffffffe
cmp ecx, 0xffffffff
jg 0x30051d98
mov ecx, 0xfffffffe
push esi
push edx
mov edx, dword [esp + 0x88]
push edx
push ecx
mov ecx, dword [esp + 0x88]
push ecx
push eax
push 0x300a38ec
call fcn.3004f87c
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret 0x18