Function at 0x4120c0
Capabilities:
Get file size
Read file on windows
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x820
mov eax, dword [0x4395ec]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
mov ebx, ecx
push 0x3fe
push eax
mov word [ebp - 0x60c], ax
lea eax, [ebp - 0x60a]
push eax
call fcn.0041a0a0
add esp, 0xc
xor eax, eax
mov word [ebp - 0x20c], ax
push 0x206
push eax
lea eax, [ebp - 0x20a]
push eax
call fcn.0041a0a0
cmp dword [0x43a7ac], 0
je 0x4123f8
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x814], ax
lea eax, [ebp - 0x812]
push eax
call fcn.0041a0a0
add esp, 0x18
lea eax, [ebp - 0x20c]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x20c]
push eax
call fcn.00416faa
add esp, 4
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x20c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x816], ax
test ax, ax
jne 0x412161
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x412182
sub ecx, edx
sar ecx, 1
js 0x4121b2
jmp 0x4121a0
cmp word [ebp + ecx*2 - 0x20c], 0x5c
je 0x4123b2
dec ecx
jns 0x4121a0
lea edi, [ebp - 0x20c]
add edi, 0xfffffffe
jmp 0x4121c0
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x4121c0
mov eax, dword [0x434f7c]
lea ecx, [ebp - 0x20c]
mov dword [edi], eax
add ecx, 0xfffffffe
lea esp, [esp]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x4121e0
mov eax, dword [str.SiteAdv.pak]
mov dword [ecx], eax
mov eax, dword [0x4354e8]
mov dword [ecx + 4], eax
mov eax, dword [0x4354ec]
mov dword [ecx + 8], eax
mov eax, dword [0x4354f0]
mov dword [ecx + 0xc], eax
mov eax, dword [0x4354f4]
mov dword [ecx + 0x10], eax
mov eax, dword [0x4354f8]
mov dword [ecx + 0x14], eax
xor ecx, ecx
lea ecx, [ecx]
movzx eax, word [ecx + str..key]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x60e], ax
test ax, ax
jne 0x412220
lea edi, [ebp - 0x60c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x412240
mov eax, dword [0x435518]
lea edx, [ebp - 0x20c]
mov dword [edi], eax
mov esi, edx
jmp 0x412260
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x412260
lea edi, [ebp - 0x60c]
sub edx, esi
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x412276
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x60c]
add edi, 0xfffffffe
lea esp, [esp]
mov cx, word [edi + 2]
lea edi, [edi + 2]
test cx, cx
jne 0x4122a0
mov dword [edi], eax
lea eax, [ebp - 0x814]
push 0x434e98
push eax
call fcn.00416b9b
add esp, 8
test eax, eax
jne 0x412596
push eax
push 0x80
push 3
push eax
push 1
push 0x80000000
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x41259d
lea eax, [ebp - 0x81c]
mov dword [ebp - 0x81c], 0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
push esi
mov dword [ebp - 0x820], esi
call fcn.00415a62
mov edi, eax
add esp, 4
mov dword [ebp - 0x818], edi
test edi, edi
je 0x4123de
push 0
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x81c]
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4123d5
cmp esi, dword [ebp - 0x81c]
jne 0x4123d5
mov ecx, dword [ebp - 0x820]
mov eax, edi
mov esi, dword [edi + esi - 8]
mov edx, esi
push dword [eax + ecx - 4]
lea ecx, [edi + 4]
call fcn.0040d360
add esp, 4
lea eax, [ebp - 0x60c]
lea edx, [edi + 4]
xor ecx, ecx
push esi
push eax
call fcn.0040bac0
mov edi, eax
cmp edi, 0xffffffff
je 0x4123cf
push dword [ebp - 0x818]
call fcn.00415bcd
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 4
push ebx
call esi
push edi
call esi
push 4
call dword [sym.imp.KERNEL32.dll_ExitProcess]
add ecx, ecx
cmp ecx, 0x208
jae 0x4125b0
xor eax, eax
mov word [ebp + ecx - 0x20c], ax
jmp 0x4121b2
mov edi, dword [ebp - 0x818]
push edi
call fcn.00415bcd
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00415b03
mov esp, ebp
pop ebp
ret
add esp, 0xc
lea eax, [ebp - 0x20c]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x20c]
push eax
call fcn.00416faa
add esp, 4
xor ecx, ecx
movzx eax, word [ecx + str..key]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x60e], ax
test ax, ax
jne 0x412420
lea edi, [ebp - 0x60c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x412440
mov eax, dword [0x435518]
lea edx, [ebp - 0x20c]
mov dword [edi], eax
mov esi, edx
jmp 0x412460
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x412460
lea edi, [ebp - 0x60c]
sub edx, esi
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x412476
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x60c]
add edi, 0xfffffffe
lea esp, [esp]
mov cx, word [edi + 2]
lea edi, [edi + 2]
test cx, cx
jne 0x4124a0
mov dword [edi], eax
lea eax, [ebp - 0x20c]
push 0x434e98
push eax
call fcn.00416b9b
add esp, 8
test eax, eax
jne 0x412596
push eax
push 0x80
push 3
push eax
push 1
push 0x80000000
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x41259d
lea eax, [ebp - 0x818]
mov dword [ebp - 0x818], 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push ebx
call fcn.00415a62
mov esi, eax
add esp, 4
test esi, esi
je 0x41259d
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x818]
push eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41257a
cmp ebx, dword [ebp - 0x818]
jne 0x41257a
push ebx
lea eax, [ebp - 0x60c]
mov edx, esi
push eax
xor ecx, ecx
call fcn.0040bac0
mov edi, eax
cmp edi, 0xffffffff
je 0x41257a
push esi
call fcn.00415bcd
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 4
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push esi
call fcn.00415bcd
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00415b03
mov esp, ebp
pop ebp
ret
mov ecx, ebx
call fcn.0040ffe0
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00415b03
mov esp, ebp
pop ebp
ret
call fcn.00416801
int3