Function at 0x421510
Capabilities:
Access peb ldr_data
Get ntdll base address
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4268f6
mov eax, dword fs:[0]
push eax
sub esp, 0x118
mov eax, dword [0x434020]
xor eax, esp
mov dword [esp + 0x114], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x434020]
xor eax, esp
push eax
lea eax, [esp + 0x12c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x13c]
xor ebx, ebx
push 0x103
lea eax, [esp + 0x29]
push ebx
push eax
mov byte [esp + 0x23], bl
mov byte [esp + 0x30], bl
call sub.MSVCR80.dll_memset
mov edx, dword [0x4360c0]
mov eax, dword [edx + 0xc]
add esp, 0xc
mov ecx, 0x4360c0
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
lea ecx, [esp + 0x20]
mov dword [esp + 0x134], ebx
call fcn.00421350
lea ebx, [esp + 0x18]
mov byte [esp + 0x134], 1
call fcn.00421b30
mov byte [esp + 0x134], 0
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 0x4215cf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [esp + 0x18]
cmp dword [ebx - 0xc], 0
jne 0x421607
lea eax, [ebx - 0x10]
mov dword [esp + 0x134], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x421600
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x4217bf
lea eax, [esp + 0x24]
mov esi, ebx
mov ecx, eax
mov edx, 0x104
sub esi, ecx
lea ecx, [edx + 0x7ffffefa]
test ecx, ecx
je 0x421633
mov cl, byte [esi + eax]
test cl, cl
je 0x421633
mov byte [eax], cl
add eax, 1
sub edx, 1
jne 0x421616
jmp 0x421637
test edx, edx
jne 0x42163a
sub eax, 1
cmp dword [ebp + 0x1c], 0x10
mov byte [eax], 0
jb 0x421648
mov eax, dword [ebp + 8]
jmp 0x42164b
lea eax, [ebp + 8]
push eax
lea edx, [esp + 0x28]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [esp + 0x24]
push 0x42bdfc
push eax
call dword [sym.imp.MSVCR80.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
mov dword [esp + 0x1c], edi
je 0x421794
push 0x21
call sub.MSVCR80.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
add esp, 4
test esi, esi
je 0x421779
mov ebx, dword [sym.imp.MSVCR80.dll_fread]
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
push edi
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
push 0x21
mov dword [esi + 0x18], eax
push 1
mov dword [esi + 0x1c], eax
push esi
mov byte [esi + 0x20], al
call ebx
add esp, 0x10
cmp eax, 0x21
jne 0x421779
push 4
push str.KSWS
push esi
call dword [sym.imp.MSVCR80.dll__strnicmp]
add esp, 0xc
test eax, eax
jne 0x421779
mov eax, dword [esi + 0x15]
cmp eax, 0xa00000
jg 0x421779
cmp dword [esi + 5], 0x5060
jne 0x421779
xor ecx, ecx
mov dword [ebp + 0x3c], eax
mov edx, 0x38
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00424aa5
mov ecx, dword [ebp + 0x3c]
lea edi, [ecx*8]
sub edi, ecx
add edi, edi
add edi, edi
add edi, edi
push edi
push 0
push eax
mov dword [ebp + 0x38], eax
call sub.MSVCR80.dll_memset
mov eax, dword [esp + 0x2c]
mov ecx, dword [ebp + 0x38]
push eax
push edi
push 1
push ecx
call ebx
add esp, 0x20
cmp eax, edi
jne 0x42175d
mov edx, dword [ebp + 0x38]
push eax
push edx
push 0
call fcn.004206b0
add esp, 0xc
cmp eax, dword [esi + 0x19]
jne 0x42175d
mov byte [esp + 0x17], 1
jmp 0x421775
mov eax, dword [ebp + 0x38]
xor edi, edi
cmp eax, edi
je 0x421772
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [ebp + 0x38], edi
mov dword [ebp + 0x3c], edi
mov edi, dword [esp + 0x1c]
push edi
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 4
test esi, esi
je 0x421790
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov ebx, dword [esp + 0x18]
lea eax, [ebx - 0x10]
mov dword [esp + 0x134], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4217bb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, byte [esp + 0x17]
mov ecx, dword [esp + 0x12c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x114]
xor ecx, esp
call fcn.00424bfa
add esp, 0x124
ret 4