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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x54ea87
mov eax, dword fs:[0]
push eax
sub esp, 0x138
mov eax, dword [0x5ad1d0]
xor eax, esp
mov dword [esp + 0x130], eax
push ebx
push esi
push edi
mov eax, dword [0x5ad1d0]
xor eax, esp
push eax
lea eax, [esp + 0x148]
mov dword fs:[0], eax
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], ecx
cmp esi, ebx
je 0x4128a4
xor edx, edx
mov eax, 0x20
nop
lea ecx, [eax + edx]
shr ecx, 1
mov edi, esi
shr edi, cl
test edi, edi
je 0x412801
mov edx, ecx
jmp 0x412803
mov eax, ecx
mov ecx, eax
sub ecx, edx
cmp ecx, 8
ja 0x4127f0
shr eax, 3
cmp eax, 2
jbe 0x4128a4
push 0x1d
mov esi, 0xf
push str.Mash:_output_legnth_too_large
lea ecx, [esp + 0x78]
mov dword [esp + 0x8c], esi
mov dword [esp + 0x88], ebx
mov byte [esp + 0x78], bl
call fcn.004013d0
lea ecx, [esp + 0x44]
mov dword [esp + 0x150], ebx
call fcn.0051b549
push 0xffffffffffffffff
mov byte [esp + 0x154], 1
push ebx
lea edx, [esp + 0x78]
push edx
lea ecx, [esp + 0x60]
mov dword [esp + 0x50], vtable.KM::Exception.0
mov dword [esp + 0x5c], 1
mov dword [esp + 0x74], esi
mov dword [esp + 0x70], ebx
mov byte [esp + 0x60], 0
call fcn.004014d0
push 0x5a19dc
lea eax, [esp + 0x48]
mov byte [esp + 0x154], 0
push eax
mov dword [esp + 0x4c], vtable.KM::InvalidArgument.0
call fcn.0051fe38
lea ecx, [esp + 0x20]
push ecx
lea ecx, [ebp + 0x10]
mov dword [esp + 0x24], 0x14
call fcn.00414250
mov esi, eax
add esp, 4
mov dword [esp + 0x3c], esi
cmp esi, 0xffffffff
jbe 0x4128cc
call fcn.00403bb0
cmp esi, ebx
jne 0x4128d6
mov dword [esp + 0x1c], ebx
jmp 0x4128e1
mov edi, esi
call fcn.00414990
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x40], edx
mov dword [esp + 0x150], 2
mov dword [esp + 0x30], esi
cmp esi, 0xffffffff
jbe 0x412902
call fcn.00403bb0
cmp esi, ebx
jne 0x41290e
xor edi, edi
mov dword [esp + 0x18], edi
jmp 0x41291b
mov edi, esi
call fcn.00414990
mov dword [esp + 0x18], eax
mov edi, eax
mov dword [esp + 0x34], edi
lea eax, [esp + 0x8c]
push eax
mov byte [esp + 0x154], 3
call fcn.00412b00
mov byte [esp + 0x150], 4
cmp dword [ebp + 0x10], 0
jbe 0x4129aa
mov ecx, ebx
shr ecx, 8
push 2
lea edx, [esp + 0x18]
mov byte [esp + 0x18], cl
push edx
lea ecx, [esp + 0x94]
mov byte [esp + 0x1d], bl
call fcn.00418db0
mov eax, dword [ebp + 0xc]
mov ecx, dword [esp + 0x28]
push eax
push ecx
lea ecx, [esp + 0x94]
call fcn.00418db0
mov edx, dword [esp + 0x8c]
mov eax, dword [edx + 0x1c]
lea ecx, [esp + 0x8c]
call eax
mov edx, dword [esp + 0x8c]
push eax
mov eax, dword [edx + 0x38]
lea ecx, [edi + ebx]
push ecx
lea ecx, [esp + 0x94]
call eax
add ebx, 0x14
cmp ebx, dword [ebp + 0x10]
jb 0x412942
mov eax, dword [ebp + 0x14]
cmp eax, 1
jle 0x412a4a
dec eax
mov dword [esp + 0x20], eax
jmp 0x4129c0
mov ecx, dword [esp + 0x1c]
push esi
push edi
push ecx
call fcn.0051f9d0
add esp, 0xc
xor ebx, ebx
test esi, esi
je 0x412a3c
mov edx, ebx
push 2
lea eax, [esp + 0x18]
shr edx, 8
push eax
lea ecx, [esp + 0x94]
mov byte [esp + 0x1c], dl
mov byte [esp + 0x1d], bl
call fcn.00418db0
mov ecx, dword [esp + 0x1c]
push esi
push ecx
lea ecx, [esp + 0x94]
call fcn.00418db0
mov edx, dword [esp + 0x8c]
mov eax, dword [edx + 0x1c]
lea ecx, [esp + 0x8c]
call eax
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x8c]
push eax
mov eax, dword [edx + 0x38]
add ecx, ebx
push ecx
lea ecx, [esp + 0x94]
call eax
add ebx, 0x14
cmp ebx, esi
jb 0x4129d5
dec dword [esp + 0x20]
mov edi, dword [esp + 0x18]
jne 0x4129c0
mov ecx, dword [ebp + 0x10]
mov edx, dword [esp + 0x24]
push ecx
push edi
push edx
call fcn.0051f9d0
mov eax, dword [esp + 0x144]
lea ecx, [esp + 0xf8]
add esp, 0xc
cmp eax, ecx
jne 0x412a87
mov ecx, dword [esp + 0x134]
mov edi, eax
xor eax, eax
mov byte [esp + 0x12d], 0
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0xe8]
lea edx, [esp + 0x9c]
cmp eax, edx
jne 0x412ab2
mov ecx, dword [esp + 0xe4]
mov edi, eax
xor eax, eax
mov byte [esp + 0xdd], 0
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x18]
xor al, al
mov ecx, esi
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x18]
push eax
call fcn.0051c65c
mov edx, dword [esp + 0x20]
mov edi, edx
xor al, al
mov ecx, esi
push edx
rep stosb byte es:[edi], al
call fcn.0051c65c
add esp, 8
mov ecx, dword [esp + 0x148]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.0051b53a
mov esp, ebp
pop ebp
ret