Function at 0x422484
Capabilities:
Resolve function by parsing pe exports
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe44
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x1bc], ecx
mov dword [ebp - 0x1b8], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x18]
call fcn.00404744
xor eax, eax
push ebp
push 0x42282d
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x18]
call fcn.00420bc4
test al, al
je 0x422802
lea ecx, [ebp - 0x1b8]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 8]
mov edx, dword [ebp - 0x18]
call fcn.0040804c
mov eax, dword [ebp - 0x1b8]
lea edx, [ebp - 0x1c]
call fcn.00420964
lea edx, [ebp - 0x1b4]
mov eax, dword [ebp - 0x18]
call fcn.00420af4
test al, al
je 0x4227be
lea eax, [ebp - 0x1b4]
call fcn.00420b60
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x1b4]
call fcn.00420b98
cmp edx, 0
jne 0x42252d
cmp eax, 0xff000000
seta bl
jmp 0x422530
setg bl
mov dword [ebp - 0x4e], 0x4034b50
test bl, bl
je 0x422543
mov word [ebp - 0x4a], 0x2d
jmp 0x422549
mov word [ebp - 0x4a], 0x14
mov word [ebp - 0x48], 2
mov word [ebp - 0x46], 8
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x44], eax
xor eax, eax
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x1c]
call fcn.00404554
mov word [ebp - 0x34], ax
test bl, bl
je 0x4225ae
mov word [ebp - 0x72], 1
mov word [ebp - 0x70], 0x10
mov dword [ebp - 0x6e], 0
mov dword [ebp - 0x6a], 0
mov dword [ebp - 0x66], 0
mov dword [ebp - 0x62], 0
mov dword [ebp - 0x3c], 0xffffffff
mov dword [ebp - 0x38], 0xffffffff
mov word [ebp - 0x32], 0x14
jmp 0x4225be
xor eax, eax
mov dword [ebp - 0x3c], eax
xor eax, eax
mov dword [ebp - 0x38], eax
mov word [ebp - 0x32], 0
mov eax, dword [ebp - 0x14]
call fcn.00412de4
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edx
xor eax, eax
push ebp
push 0x4227a1
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0x4e]
mov ecx, 0x1e
mov eax, dword [ebp - 0x14]
mov esi, dword [eax]
call dword [esi + 0x10]
lea eax, [ebp - 0x1c]
call fcn.004047ac
mov edx, eax
movzx ecx, word [ebp - 0x34]
mov eax, dword [ebp - 0x14]
mov esi, dword [eax]
call dword [esi + 0x10]
test bl, bl
je 0x422613
movzx ecx, word [ebp - 0x32]
lea edx, [ebp - 0x72]
mov eax, dword [ebp - 0x14]
mov esi, dword [eax]
call dword [esi + 0x10]
mov eax, dword [ebp - 0x14]
push eax
push 0
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x18]
push eax
mov eax, dword [ebp - 0x14]
mov al, byte [eax + 0x14]
push eax
mov eax, dword [ebp - 0x14]
push dword [eax + 0x2c]
push dword [eax + 0x28]
mov ecx, dword [ebp - 0x18]
mov dl, 1
mov eax, dword [0x420878]
call fcn.0042283c
mov esi, eax
mov eax, dword [ebp - 0x14]
mov dword [eax + 0x20], esi
mov edi, esi
push 0xa
call sub.KERNEL32.DLL_TlsSetValue
mov eax, edi
call fcn.004210b4
test al, al
je 0x422649
mov esi, dword [edi + 0x40]
and esi, 0xfff
mov eax, dword [edi + 0x78]
mov dword [ebp - 0x10], eax
mov eax, dword [edi + 0x7c]
mov dword [ebp - 0xc], eax
mov eax, dword [edi + 0x80]
mov dword [ebp - 8], eax
mov eax, dword [edi + 0x84]
mov dword [ebp - 4], eax
mov eax, dword [edi + 0x70]
mov dword [ebp - 0x30], eax
mov eax, edi
call fcn.004035a4
mov eax, dword [ebp - 0x14]
xor edx, edx
mov dword [eax + 0x20], edx
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
add eax, 0xe
adc edx, 0
push edx
push eax
mov eax, dword [ebp - 0x14]
call fcn.00412e04
lea edx, [ebp - 0x30]
mov ecx, 4
mov eax, dword [ebp - 0x14]
mov edi, dword [eax]
call dword [edi + 0x10]
test bl, bl
je 0x422711
movzx eax, word [ebp - 0x34]
xor edx, edx
push edx
push eax
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
add eax, 0x1e
adc edx, 0
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
add eax, 4
adc edx, 0
push edx
push eax
mov eax, dword [ebp - 0x14]
call fcn.00412e04
lea edx, [ebp - 0x10]
mov ecx, 8
mov eax, dword [ebp - 0x14]
mov ebx, dword [eax]
call dword [ebx + 0x10]
lea edx, [ebp - 8]
mov ecx, 8
mov eax, dword [ebp - 0x14]
mov ebx, dword [eax]
call dword [ebx + 0x10]
jmp 0x42273d
mov eax, dword [ebp - 8]
mov dword [ebp - 0x2c], eax
lea edx, [ebp - 0x2c]
mov ecx, 4
mov eax, dword [ebp - 0x14]
mov ebx, dword [eax]
call dword [ebx + 0x10]
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x2c], eax
lea edx, [ebp - 0x2c]
mov ecx, 4
mov eax, dword [ebp - 0x14]
mov ebx, dword [eax]
call dword [ebx + 0x10]
push 0
push 0
mov dl, 2
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
call dword [ecx + 0x18]
test esi, esi
jne 0x422797
mov eax, dword [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x18]
call fcn.00407d04
push eax
mov ax, word [ebp - 0x48]
push eax
mov ax, word [ebp - 0x46]
push eax
push dword [ebp - 0x24]
push dword [ebp - 0x28]
push dword [ebp - 4]
push dword [ebp - 8]
push dword [ebp - 0xc]
push dword [ebp - 0x10]
mov ecx, dword [ebp - 0x20]
mov dl, 1
mov eax, dword [0x420710]
call fcn.00421bd0
mov ecx, eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x10]
mov edx, dword [ebp - 0x1c]
mov ebx, dword [eax]
call dword [ebx + 0x3c]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4227c3
mov esi, 4
test esi, esi
je 0x422802
cmp esi, 5
je 0x4227d5
cmp esi, 7
je 0x4227d5
xor eax, eax
jmp 0x4227d7
mov al, 1
mov edx, dword [ebp - 0x14]
mov byte [edx + 0x1c], al
push esi
lea edx, [ebp - 0x1bc]
mov eax, esi
call fcn.00420bf4
mov ecx, dword [ebp - 0x1bc]
mov dl, 1
mov eax, dword [0x4206b8]
call fcn.00421c90
call fcn.00403c70
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x422834
lea eax, [ebp - 0x1bc]
mov edx, 2
call fcn.004042b8
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.004042b8
ret