Function at 0x409350
Capabilities:
Encode data using xor
Get file size
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x46ba6e
mov eax, dword fs:[0]
push eax
sub esp, 0x218
mov eax, dword [0x4854a0]
xor eax, esp
mov dword [esp + 0x210], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4854a0]
xor eax, esp
push eax
lea eax, [esp + 0x22c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x23c]
mov esi, ecx
mov edi, dword [esi + 8]
cmp dword [esi + 4], edi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x18], ebp
jbe 0x4093a9
call fcn.004382be
mov ebx, dword [esi + 4]
cmp ebx, dword [esi + 8]
jbe 0x4093b6
call fcn.004382be
push edi
push esi
push ebx
push esi
lea eax, [esp + 0x34]
push eax
push esi
call fcn.0040fab0
xor esi, esi
push esi
push 0x80
push 3
push esi
mov ebx, 1
push ebx
push SysReAllocStringLen
push ebp
mov byte [esp + 0x4c], bl
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x34], eax
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], esi
cmp eax, 0xffffffff
mov dword [esp + 0x234], esi
jne 0x409432
cmp byte [esp + 0x30], bl
jne 0x40940f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [esp + 0x3c]
call fcn.00402080
mov eax, dword [esp + 0x40]
cmp eax, esi
je 0x4098d3
push eax
call fcn.0041bf87
add esp, 4
jmp 0x4098d3
lea ecx, [esp + 0x4c]
push ecx
push eax
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov ebp, dword [esp + 0x4c]
mov eax, dword [esp + 0x50]
add ebp, 0xfffffff3
adc eax, 0xffffffff
push eax
push ebp
lea esi, [esp + 0x38]
mov dword [esp + 0x58], eax
call fcn.0040f320
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x27]
push eax
call fcn.00413330
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x120]
push edx
mov ebx, 0xc
call fcn.00413330
mov edi, str.PATCHFILE__
lea esi, [esp + 0x11c]
mov ecx, 0xd
xor eax, eax
mov byte [esp + 0x128], 0
repe cmpsb byte [esi], byte es:[edi]
je 0x4094dd
cmp byte [esp + 0x30], 1
jne 0x4094ba
mov ecx, dword [esp + 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [esp + 0x3c]
call fcn.00402080
mov eax, dword [esp + 0x40]
test eax, eax
je 0x4098d3
push eax
call fcn.0041bf87
add esp, 4
jmp 0x4098d3
mov al, byte [esp + 0x23]
cmp al, 1
jne 0x40981a
mov edi, dword [esp + 0x50]
add ebp, 0xffffffe0
adc edi, 0xffffffff
push edi
push ebp
lea esi, [esp + 0x38]
call fcn.0040f320
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x20]
push eax
mov ebx, 4
call fcn.00413330
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x120]
push edx
mov ebx, 0x18
call fcn.00413330
lea eax, [esp + 0x11c]
xor ebx, ebx
push eax
lea ecx, [esp + 0x5c]
mov byte [esp + 0x138], bl
call fcn.00402480
mov ecx, dword [esp + 0x2c]
push 0xffffffffffffffff
push ebx
push eax
add ecx, 0x10
mov byte [esp + 0x240], 1
call fcn.00402f60
mov byte [esp + 0x234], bl
cmp dword [esp + 0x70], 0x10
jb 0x409576
mov ecx, dword [esp + 0x5c]
push ecx
call fcn.0041bf87
add esp, 4
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x28]
push eax
mov ebx, 4
lea esi, [esp + 0x38]
call fcn.00413330
mov esi, dword [esp + 0x2c]
add esi, 0x2c
mov eax, esi
call fcn.00402b10
mov ecx, dword [esp + 0x1c]
sub esp, 0x1c
mov eax, esp
xor ebx, ebx
mov dword [eax + 0x18], 0xf
mov dword [eax + 0x14], ebx
mov edx, esi
mov dword [esp + 0x68], esp
mov byte [eax + 4], bl
call fcn.0040f830
cmp dword [esp + 0x1c], ebx
mov dword [esp + 0x18], ebx
jle 0x409688
lea ecx, [ecx]
add ebp, 0xffffffe8
adc edi, 0xffffffff
push edi
push ebp
lea esi, [esp + 0x38]
call fcn.0040f320
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x120]
push edx
mov ebx, 0x18
call fcn.00413330
xor ebx, ebx
lea eax, [esp + 0x11c]
mov byte [esp + 0x134], bl
mov dword [esp + 0x70], 0xf
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
lea esi, [eax + 1]
jmp 0x409620
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x409620
sub eax, esi
push eax
lea eax, [esp + 0x120]
push eax
lea ecx, [esp + 0x60]
call fcn.00403a90
mov esi, dword [esp + 0x2c]
lea ecx, [esp + 0x58]
push ecx
add esi, 0x2c
mov byte [esp + 0x238], 2
call fcn.00402a60
mov byte [esp + 0x234], bl
cmp dword [esp + 0x70], 0x10
jb 0x409671
mov edx, dword [esp + 0x5c]
push edx
call fcn.0041bf87
add esp, 4
mov eax, dword [esp + 0x18]
add eax, 1
cmp eax, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
jl 0x4095d0
xor ebx, ebx
mov eax, dword [esp + 0x24]
sub ebp, eax
push eax
sbb edi, ebx
call fcn.0041bf8c
add esp, 4
mov dword [esp + 0x18], eax
cmp eax, ebx
mov byte [esp + 0x234], 3
jne 0x4096e7
push ebx
call fcn.0041bf87
add esp, 4
cmp byte [esp + 0x30], 1
jne 0x4096c4
mov eax, dword [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [esp + 0x3c]
call fcn.00402080
mov eax, dword [esp + 0x40]
cmp eax, ebx
je 0x4098d3
push eax
call fcn.0041bf87
add esp, 4
jmp 0x4098d3
push edi
push ebp
lea esi, [esp + 0x38]
call fcn.0040f320
mov edx, dword [esp + 0x18]
mov ebx, dword [esp + 0x24]
lea ecx, [esp + 0x14]
push ecx
push edx
call fcn.00413330
mov ebp, dword [esp + 0x18]
mov eax, 0x7a44c6b
mul dword [esp + 0x24]
shr edx, 3
je 0x409810
mov edi, dword [esp + 0x2c]
mov dword [esp + 0x14], edx
jmp 0x409730
xor eax, eax
mov ecx, 0xf
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x88], eax
mov byte [esp + 0x78], al
mov dword [esp + 0xa8], ecx
mov dword [esp + 0xa4], eax
mov byte [esp + 0x94], al
lea eax, [esp + 0x74]
push eax
mov ecx, ebp
mov byte [esp + 0x238], 4
call fcn.00402190
add esp, 4
lea ebx, [esp + 0x74]
mov esi, edi
mov ebp, eax
call fcn.0040e320
cmp dword [esp + 0xa8], 0x10
mov esi, dword [esp + 0x94]
jae 0x40979a
lea esi, [esp + 0x94]
mov eax, edi
call fcn.00402c10
sub eax, 1
push eax
push esi
mov esi, dword [edi + 0x3c]
call fcn.0040e510
mov esi, 0x10
mov byte [esp + 0x234], 3
cmp dword [esp + 0xa8], esi
jb 0x4097d4
mov ecx, dword [esp + 0x94]
push ecx
call fcn.0041bf87
add esp, 4
xor eax, eax
cmp dword [esp + 0x8c], esi
mov dword [esp + 0xa8], 0xf
mov dword [esp + 0xa4], eax
mov byte [esp + 0x94], al
jb 0x409805
mov edx, dword [esp + 0x78]
push edx
call fcn.0041bf87
add esp, 4
sub dword [esp + 0x14], 1
jne 0x409730
mov eax, dword [esp + 0x18]
push eax
jmp 0x409c7e
cmp al, 2
jne 0x4098ca
mov edi, dword [esp + 0x50]
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
mov dl, byte [eax + 4]
add ebp, 0xffffffd8
adc edi, 0xffffffff
push edi
push ebp
lea esi, [esp + 0x38]
mov dword [esp + 0x124], ecx
mov byte [esp + 0x128], dl
call fcn.0040f320
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x20]
push ecx
mov ebx, 4
call fcn.00413330
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x50]
push eax
call fcn.00413330
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0xfc]
push edx
mov ebx, 0x20
call fcn.00413330
mov byte [esp + 0x118], 0
xor eax, eax
xor byte [esp + eax + 0xf8], 0xa4
add eax, 1
cmp eax, 0x20
jb 0x409892
mov eax, dword [esp + 0x1c]
push eax
call fcn.0041bf8c
mov ebx, eax
add esp, 4
mov dword [esp + 0x18], ebx
test ebx, ebx
mov byte [esp + 0x234], 5
jne 0x4098ff
push eax
call fcn.0041bf87
add esp, 4
lea eax, [esp + 0x30]
call fcn.0040f2e0
xor al, al
mov ecx, dword [esp + 0x22c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x210]
xor ecx, esp
call fcn.00436f5b
add esp, 0x224
ret 4
sub ebp, dword [esp + 0x1c]
lea esi, [esp + 0x30]
sbb edi, 0
push edi
push ebp
call fcn.0040f320
lea ecx, [esp + 0x14]
push ecx
push ebx
mov ebx, dword [esp + 0x24]
call fcn.00413330
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x74]
push edx
mov edx, esi
call fcn.00405e70
add esp, 4
lea ecx, [esp + 0xf8]
lea eax, [esp + 0x74]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x409962
test dl, dl
je 0x40995e
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x409962
add eax, 2
add ecx, 2
test dl, dl
jne 0x409942
xor eax, eax
jmp 0x409967
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x409991
mov eax, dword [esp + 0x4c]
push eax
call fcn.0041bf8c
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
mov byte [esp + 0x234], 6
jne 0x409997
push eax
call fcn.0041bf87
add esp, 4
push esi
jmp 0x4098c2
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
push ecx
push edx
lea eax, [esp + 0x2c]
push eax
push ebp
call fcn.00417950
mov ecx, dword [ebp]
mov ebx, dword [esp + 0x3c]
mov dword [ebx + 0x140], ecx
add ebp, 4
mov esi, ebp
add ebp, 0x100
lea edi, [ebx + 0x40]
mov ecx, 0x40
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebp]
mov dword [esp + 0x12c], edx
mov eax, dword [ebp + 4]
mov dword [esp + 0x130], eax
mov ecx, dword [ebp + 8]
mov dword [esp + 0x134], ecx
mov edx, dword [ebp + 0xc]
mov dword [esp + 0x138], edx
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x13c], eax
mov ecx, dword [ebp + 0x14]
add esp, 0x10
lea edx, [esp + 0x11c]
mov dword [esp + 0x130], ecx
push edx
lea ecx, [esp + 0x5c]
add ebp, 0x18
mov byte [esp + 0x138], 0
call fcn.00402480
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebx + 0x10]
mov byte [esp + 0x240], 7
call fcn.00402f60
lea ecx, [esp + 0x58]
mov byte [esp + 0x234], 6
call fcn.004024c0
mov edi, dword [ebp]
lea esi, [ebx + 0x2c]
mov eax, esi
add ebp, 4
call fcn.00402b10
test edi, edi
jbe 0x409b38
mov dword [esp + 0x24], edi
mov edi, 0xf
jmp 0x409a80
mov eax, dword [ebp]
mov dword [esp + 0x11c], eax
mov ecx, dword [ebp + 4]
mov dword [esp + 0x120], ecx
mov edx, dword [ebp + 8]
mov dword [esp + 0x124], edx
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x128], eax
mov ecx, dword [ebp + 0x10]
mov dword [esp + 0x12c], ecx
mov edx, dword [ebp + 0x14]
lea eax, [esp + 0x11c]
mov dword [esp + 0x130], edx
add ebp, 0x18
mov byte [esp + 0x134], 0
mov dword [esp + 0x70], edi
mov dword [esp + 0x6c], 0
mov byte [esp + 0x5c], 0
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x409ae2
sub eax, edx
push eax
lea eax, [esp + 0x120]
push eax
lea ecx, [esp + 0x60]
call fcn.00403a90
lea ecx, [esp + 0x58]
push ecx
mov byte [esp + 0x238], 8
call fcn.00402a60
mov byte [esp + 0x234], 6
cmp dword [esp + 0x70], 0x10
jb 0x409b2d
mov edx, dword [esp + 0x5c]
push edx
call fcn.0041bf87
add esp, 4
sub dword [esp + 0x24], 1
jne 0x409a80
mov edi, dword [ebp]
mov esi, dword [ebx + 8]
add ebp, 4
cmp dword [ebx + 4], esi
jbe 0x409b4b
call fcn.004382be
mov eax, dword [ebx + 4]
cmp eax, dword [ebx + 8]
mov dword [esp + 0x24], eax
jbe 0x409b60
call fcn.004382be
mov eax, dword [esp + 0x24]
push esi
push ebx
push eax
push ebx
lea eax, [esp + 0x34]
push eax
push ebx
call fcn.0040fab0
test edi, edi
jbe 0x409c6c
mov dword [esp + 0x24], edi
mov edi, dword [esp + 0x2c]
nop
xor eax, eax
mov ecx, 0xf
mov dword [esp + 0xcc], ecx
mov dword [esp + 0xc8], eax
mov byte [esp + 0xb8], al
mov dword [esp + 0xe8], ecx
mov dword [esp + 0xe4], eax
mov byte [esp + 0xd4], al
lea ecx, [esp + 0xb4]
push ecx
mov ecx, ebp
mov byte [esp + 0x238], 9
call fcn.00402190
add esp, 4
lea ebx, [esp + 0xb4]
mov esi, edi
mov ebp, eax
call fcn.0040e320
cmp dword [esp + 0xe8], 0x10
mov esi, dword [esp + 0xd4]
jae 0x409bf3
lea esi, [esp + 0xd4]
mov eax, edi
call fcn.00402c10
sub eax, 1
push eax
push esi
mov esi, dword [edi + 0x3c]
call fcn.0040e510
mov esi, 0x10
mov byte [esp + 0x234], 6
cmp dword [esp + 0xe8], esi
jb 0x409c2d
mov edx, dword [esp + 0xd4]
push edx
call fcn.0041bf87
add esp, 4
xor eax, eax
cmp dword [esp + 0xcc], esi
mov dword [esp + 0xe8], 0xf
mov dword [esp + 0xe4], eax
mov byte [esp + 0xd4], al
jb 0x409c61
mov eax, dword [esp + 0xb8]
push eax
call fcn.0041bf87
add esp, 4
sub dword [esp + 0x24], 1
jne 0x409b80
mov ecx, dword [esp + 0x14]
push ecx
call fcn.0041bf87
mov edx, dword [esp + 0x1c]
add esp, 4
push edx
call fcn.0041bf87
add esp, 4
cmp byte [esp + 0x30], 1
jne 0x409c98
mov eax, dword [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [esp + 0x3c]
call fcn.00402080
mov eax, dword [esp + 0x40]
test eax, eax
je 0x409cb2
push eax
call fcn.0041bf87
add esp, 4
mov al, 1
jmp 0x4098d5